Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To make something Levitate ?
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#1
How To make something Levitate ?

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
...
09-18-2010, 11:57 PM
Find Reply
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: How To make something Levitate ?

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

09-19-2010, 12:03 AM
Find Reply
gosseyn Offline
Member

Posts: 63
Threads: 7
Joined: Sep 2010
Reputation: 1
#3
RE: How To make something Levitate ?

I want to be able to manipulate position, rotation, and scale of entities via scripting, simple !
09-19-2010, 12:07 AM
Find Reply
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#4
RE: How To make something Levitate ?

(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.

[Image: 16455.png]
09-19-2010, 01:07 AM
Find Reply
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#5
RE: How To make something Levitate ?

Isnt't there a less tricky method like a SetPos Or SetRot ?
09-19-2010, 01:08 AM
Find Reply
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#6
RE: How To make something Levitate ?

(09-19-2010, 01:08 AM)Alroc Wrote: Isnt't there a less tricky method like a SetPos Or SetRot ?

No.

[Image: 16455.png]
09-19-2010, 01:09 AM
Find Reply
Alroc Offline
Junior Member

Posts: 24
Threads: 4
Joined: Sep 2010
Reputation: 0
#7
RE: How To make something Levitate ?

So sad Sad ...
09-19-2010, 01:22 AM
Find Reply
nofsky Offline
Senior Member

Posts: 423
Threads: 13
Joined: Sep 2008
Reputation: 1
#8
RE: How To make something Levitate ?

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.
09-19-2010, 03:04 AM
Find Reply
gosseyn Offline
Member

Posts: 63
Threads: 7
Joined: Sep 2010
Reputation: 1
#9
RE: How To make something Levitate ?

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 :

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.
09-19-2010, 05:32 AM
Find Reply
gosseyn Offline
Member

Posts: 63
Threads: 7
Joined: Sep 2010
Reputation: 1
#10
RE: How To make something Levitate ?

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!
09-19-2010, 11:51 AM
Find Reply




Users browsing this thread: 1 Guest(s)