|
1 registered members (Grant),
999
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: General question / theory: standing on moving platforms
[Re: Alan]
#291975
09/29/09 13:42
09/29/09 13:42
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
With question one, make sure the lift has a higher "push" value than the player. This way, the lift is "pushing" harder than the player can, so the player will be 'pushed' out of the way (ie up). But the players gravity code must be processed AFTER the lift code each frame. This is just theory for me too. Ive never implemented anything like this yet.
And question two. I dont know if this is the 'best' way, but heres how I would do it. This is applicable to both vertical and horizontal platforms. 1> Give the platform a "type" marker skill to indicate its a platform. 2> Give the platform a "travelled" vector skill to say how far it travelled SINCE THE LAST FRAME, not total distance. 3> Have the platforms action update the "travelled" vector every frame. 4> Have the players gravity code check if the player is 'touching' an entity with the platform skill on, and if it is, then move the player by the amount in the platforms "travelled' vector.
Hope this is of some help.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|