Horizontal Moving Platform
by Abhinav Chokhavatia · in Torque Game Builder · 10/07/2008 (3:51 am) · 4 replies
Hi,
I am working on plat former game, Where we are using horizontal platform, now issue is that player is not moving with that platform. I am using scene object for collision on that platform, player don't move with the platform and comes down as platform moves away. I am using TGB 1.7.3 Pro.
Regards
~Abhi...
I am working on plat former game, Where we are using horizontal platform, now issue is that player is not moving with that platform. I am using scene object for collision on that platform, player don't move with the platform and comes down as platform moves away. I am using TGB 1.7.3 Pro.
Regards
~Abhi...
About the author
#2
Thanks for your reply.
I already have the PSK from Day one. We are trying to make a complete platformer game and all of our levels are unique.
We have tried adding the platform's velocity to the player's velocity but it did not work. We have also tried setting position as per the platform and also tried to mount the player on the platform.
When we add the platform's velocity to the player's velocity:
The animation changes by itself
When we set the position as per the platform:
The player follows the platform and a single frame is called
Mounting the player on the platform:
It vibrates
We have been facing these issues from day 1 and have been trying to solve it. But none of the above solutions seem to work.
Any help would be very much appreciated.We can share with you the code or if you could give us the sample code ,that would be very much appreciated.
Warm Regards,
Abhinav
10/07/2008 (11:14 pm)
Hi MichaelThanks for your reply.
I already have the PSK from Day one. We are trying to make a complete platformer game and all of our levels are unique.
We have tried adding the platform's velocity to the player's velocity but it did not work. We have also tried setting position as per the platform and also tried to mount the player on the platform.
When we add the platform's velocity to the player's velocity:
The animation changes by itself
When we set the position as per the platform:
The player follows the platform and a single frame is called
Mounting the player on the platform:
It vibrates
We have been facing these issues from day 1 and have been trying to solve it. But none of the above solutions seem to work.
Any help would be very much appreciated.We can share with you the code or if you could give us the sample code ,that would be very much appreciated.
Warm Regards,
Abhinav
#3
10/08/2008 (11:21 am)
I didn,t get that to work either : (
#4
10/08/2008 (11:36 am)
That's strange. I don't know the PSK really well but moving platforms never seemed to be a problem. There should be a demo project provided with the PSK that at least features a vertically moving platform. I once modified the platforms velocity so it moved both vertically and horizontally which worked just fine. Be sure all platforms and actors have the right Behaviors attached to them like shown in the demo level tutorial.
Torque Owner Michael Woerister
If you can spare the $50 you can spare yourself A LOT of work by purchasing the Platformer Starter Kit :)
A way of achieving the behavior you ask for is manually adding the platform's velocity to the player's velocity as soon as the player stands on the platform.
-Michael
edit: fixed that url.