Game Development Community

Trouble with castCollision in T2D

by Igor Kuryatnikov · in Torque Game Builder · 05/23/2006 (5:13 am) · 3 replies

I try to create some jumping system for a platformer game, there is jumping based on angle and power. I use for this setImpulseForcePolar() and setConstantForcePolar() (for gravity). But i must check situation when player lands on the edge of platform. But simulation of jump with castCollision fails when I set setImpulseForcePolar() to player - castCollision is return strange collision position or return nothing. I've set different time from 1sec to 1000sec and I'm sure speed isn't 0 - my player is jumping right.
(Player has custom collision poly which is rectangle smaller than sprite size)
Please help me!

#1
06/16/2006 (5:31 am)
Does anybody used castCollision()?
#2
06/16/2006 (7:44 am)
The position castCollision() returns is not the contact point but the position of the sceneobject at the time of collision.
#3
06/07/2009 (1:28 pm)
Lovely, just wasted a few hours on that before seeing this :)

Time to edit TDN.