Frictional Games Forum (read-only)

Full Version: How To make something Levitate ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi I was wondering how to make an object like chair flying slowly in the air like levitating

but the only result I have is making something flying By an impulse
...
I am actually interested in that too. I only saw Entih being able to levitate the player in his video on YouTube, maybe he sees this thread and will answer.

His thread: http://www.frictionalgames.com/forum/thread-4464.html
His video: http://www.youtube.com/watch?v=rPNN2OaX0oQ
I want to be able to manipulate position, rotation, and scale of entities via scripting, simple !
(09-18-2010, 11:57 PM)Alroc Wrote: [ -> ]Hi I was wondering how to make an object like chair flying slowly in the air like levitating

but the only result I have is making something flying By an impulse
...

Use AddPropForce in a timer (that runs maybe 50-100 times a second) instead... Then just find the amount of force required to just make the chair lift off the ground.
Isnt't there a less tricky method like a SetPos Or SetRot ?
(09-19-2010, 01:08 AM)Alroc Wrote: [ -> ]Isnt't there a less tricky method like a SetPos Or SetRot ?

No.
So sad Sad ...
If you edit an object in the ModelEditor you can turn off gravity on it so that it floats in the air. Then you can use scripting to push it a little bit in different directions. That's probably your best bet.
that is a good idea nofsky, i am trying that right now and it is the closest i found to what i am trying to achieve, thanks!

edit : i found a semi-solution, i play with gravity, impulses and block boxes that are blocking everything but the player. But i still have problems making a good loop with impusles, i try something like :

Code:
while (1)
     {
          AddTimer("", 1.0f, "LevitateUp");
          AddTimer("", 2.0f, "LevitateDown");
     }

void LevitateUp(string &in asTimer)
     {
          AddPropImpulse("MyChair", 0.0, 1, 0.0, "world");
     }

void LevitateDown(string &in asTimer)
     {
          AddPropImpulse("MyChair", 0.0, -1, 0.0, "world");
     }

I know my while loop is an infinite loop, and it is making the game crash, but i think maybe i don't know where to place it. I want the levitating effect to start as soon as the player enters the level. Any input? Thanks.
please anyone can help with creating a loop that will give a levitating effect on an object?
The object is already standing in the air, i just need to give it a nifty effect of vibrating.Thanks!
Pages: 1 2