Advertisement

jumping on moving plane

Started by October 27, 2012 10:52 AM
1 comment, last by Kurt-olsson 12 years, 3 months ago
Hi!

My FPS game is moving along and i now want to implement moving "levels". for example moving floors that the player needs to "transport" on to get to next destination in the game.

My collision detection/response works with moving objects, no problem there, but i cant seem to match the movement vector from the "moveobject" with my player?

should i include this in my collision response or should i make something seperatly?

i have tried this, it works but gives me a "gap" when i dont have "full-contact with the floor"

At collision response when i correct the player position i also add the "velocity-vector" of the moving plane to the player.

I get this behaviour:

jump on plane
slide for a bit
then moves along.

I think i get this problem because i only add the movement to the player only if there is a collision, i think i need to do this with some other checks to?

any tips?
Solved it,
it is working as i tried, my problem was that i was rendering my scene two times (frawing buffer to texture) and the position was updated 2 times, and that is why my model moved faster than my player. =)
Advertisement
By the way, with my collision detection i noticed, that if i just add gravity i stay on the plane that is moving!
I didn´t have to do anything for this to work.! =) hehe

This topic is closed to new replies.

Advertisement