I think my question is stupid but I’ll question you. I want to put a character in my game. But I wat to put it in the correct way(I think).
Instead to use setPos function and passing values until I see the character is in a good position on the plane, what I want is the character remains falling until it touch the floor. I’ve think to do this like this:
insert the collider(from object) characteristic in the characted;
insert the collided(into object) characteristic in the floor
decrements the z-position(it’s my up-vector) until the touch occurs.
In my mind works, But I don’t know if this is a good way to do this. Can anyone points to me it’s a good idea or a horrible idea? I ould like suggestions to do this,please.
If I’m not being so clear, I don’t mind to explain again in another way.
Hmm, it might be a better idea to make a collisionray to measure the distance from the object to the intersection point on the ground (if its just a plane you don’t need a collisionray but you could do with just some calculations), then decrement the object’s position by that value. Then you have it in one pass instead of having to decrement the z position everytime.
You can take a look at the Roaming Ralph example. It makes use of a CollisionRay to put Ralph on the terrain, and let him stay there (it basically checks the height of the terrain at that point, and puts Ralph there.)