Drills are free, free falling...
by Zilla · in Torque X 2D · 07/17/2007 (7:52 am) · 7 replies
I am experimenting with the components of the platformer kit.
What I am trying to do is to apply "standard" gravity to an object, so that it can fall from a platform but not through it.
I searched the .cs files for such a "gravity"-code that I could copy and/or implement in my own component but I didn't find anything...
Is there a (simple) solution for such a behaviour?
What I am trying to do is to apply "standard" gravity to an object, so that it can fall from a platform but not through it.
I searched the .cs files for such a "gravity"-code that I could copy and/or implement in my own component but I didn't find anything...
Is there a (simple) solution for such a behaviour?
#2
As I already said, I am experimenting with the components of the platformer kit and torque x.
I wanna do the following:
The player should be able to push the drills around like in the microbes tutorial.
I can spawn drills and push them around with the attractor and repeller components from the microbes tutorial.
But it is not so easy as I thought (remember I am a newbie...) because when I apply a (Drill)ActorComponent to the drills, then the player cannot push them anymore.
07/17/2007 (3:32 pm)
I am a newbie and therefore my questions are a bit vague and silly and I am Swiss and therefore my English is far from perfect...As I already said, I am experimenting with the components of the platformer kit and torque x.
I wanna do the following:
The player should be able to push the drills around like in the microbes tutorial.
I can spawn drills and push them around with the attractor and repeller components from the microbes tutorial.
But it is not so easy as I thought (remember I am a newbie...) because when I apply a (Drill)ActorComponent to the drills, then the player cannot push them anymore.
#3
07/17/2007 (6:37 pm)
The ActorComponent most probably has physics (movement) related states that over-ride your repulsion/attraction components--the method the repulsion/attraction component is nifty for what it does, but isn't really designed as a completely independent and "cooperative" physics input that works with other components.
#4
Nevertheless, can you give me an advice how I should create an object that I can push from a platform?
Thank you very much in adv :-)
07/18/2007 (1:46 am)
I see...Nevertheless, can you give me an advice how I should create an object that I can push from a platform?
Thank you very much in adv :-)
#5
07/18/2007 (8:05 am)
Well, I would start with the Platformer Starter Kit documentation that discusses actor movement, and then look at the C# code that implements this movement, and then adjust my repeller/attractor components to provide information to the actor component instead of trying to control the physics of my owner directly (which is what the repeller component current does if I remember correctly).
#6
07/18/2007 (11:47 am)
Thank you very much for your help :-)
#7
07/18/2007 (12:55 pm)
Also, you will probably want to look into InheritedVelocity on the ActorComponent for applying forces to actors.
Torque Owner Thomas Buscaglia