Collision Problem
by Charles Speer · in Torque X 2D · 05/14/2008 (8:56 pm) · 2 replies
I've got 2 sqaure objects in my game both using CollisionBoxShape. One object is the player and another is a moving platform in mid-air. When my player lands on it, the physics sometimes does crazy stuff and shoots the player off. So I wanted to 'stick' the player to this moving platform when he lands on it. However, after implementing the 'stick' code, the player will stick if it hits the sides and even the bottom of the platform. I just want the OnCollision function to call (or at least just the code in the OnCollision function to execute) when the player lands on TOP of the platform, and not on the sides or bottom. But I still want collision to stop the velocity of the player on the sides and bottom.
Has anyone found a similar solution to something like this? Like maybe a teleporter that teleports when the player lands on top of it, but not when the player hits the side of it. Any help is appreciated.
Has anyone found a similar solution to something like this? Like maybe a teleporter that teleports when the player lands on top of it, but not when the player hits the side of it. Any help is appreciated.
#2
05/22/2008 (5:43 pm)
Another issue: I'm trying to collide a TorqueObject with a regular RigidComponent setup with another TorqueObject that has T3DStaticGeometryComponent. Basically, I want my player to to call it's OnCollision() function when it hits the level boundries. However, it only calls when the regular RigidComponent setup is on that object. I don't want to give my level boundries a RigidComponent because there is no particular collision 'shape' that I want to give it. That is why I'm using poly soup. Has anyone conquered this problem already?
Torque 3D Owner Charles Speer