Tiny Collision on Terrain?

All about the core api and animation, input, sound, effect, collision and physics engines.
You can also post here your feature requests.

Moderator: Brume Dev Team

Tiny Collision on Terrain?

Postby Bostich on Thu Nov 29, 2007 9:46 pm

Hi there :)

ATM i want to try to play a little bit with moving tiny arround. After some test's i got it to move tiny to the left, right front and back.

But tiny walks trough my little mountains, how is it possible that i got a really "walk feeling" (sry no idea to describe it better^^).

That includse also, that tiny dont walk in the air, if u know what i mean :D.


Any tips would be very nice :)

Ty, Bostich

//Edit:

hehe, i looked long time into the code, to find how i can fix my problem. didnt find anything. 30 seconds after my post, i find the solution in ur demo. HAHA :D

for other people:

// adjust to terrain height
tiny.Pos.Y = currentTerrain.GetHeight(tiny.Pos.X, tiny.Pos.Z) + 0.25f;

:>
Bostich
Brume Rookie
 
Posts: 10
Joined: Mon Nov 26, 2007 9:31 pm

Re: Tiny Collision on Terrain?

Postby Silmaryls on Thu Nov 29, 2007 10:31 pm

Yep that's the solution :wink:
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Re: Tiny Collision on Terrain?

Postby Bostich on Fri Nov 30, 2007 12:47 pm

Hello again Silmaryls :)

today i was taken the newest snapshot from svn an compiled the "game class".

In your precompiled Brume 1.6 Demo, u have a nicely terrain collision (u cant move behind or under the terrain with the activeCamera). In the game class this is not so. Can u say me how u do this?

in the game class in method "TestTerrain" is written:

Code: Select all
...
terrainGeoMipMap.HasCollisions = true;
...


but that doesnt seems enough.

So what can i do to get this working :).

ty, Bostich
Bostich
Brume Rookie
 
Posts: 10
Joined: Mon Nov 26, 2007 9:31 pm

Re: Tiny Collision on Terrain?

Postby Silmaryls on Sun Dec 02, 2007 10:51 am

Well first the SVN version is really unstable one. In fact I'm changing Brume architecture in order to support DX10 in the future.
So you will better have to stick to the CVS repository if you want something stable (until next release).
But It's your choice.

Now for the terrain collisions : the HasCollisions property you are talking about is used for collisions with the Collision/Physics part of the demo (for example the sphere stack is falling on the table and then on the terrain).

If you are talking about camera 3 (the one that follows tiny in the demo), the collision system is really simple. I'm just checking the camera height every frame :

Code: Select all
float currentY = currentTerrain.GetHeight(camera.Pos.X, camera.Pos.Z);
if (camera.Pos.Y <= currentY)
{
     camera.Pos.Y = currentY;
}
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France


Return to Technical discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron