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


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

Posts: 24
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
gosseyn Offline
Member

Posts: 63
Joined: Sep 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 545
Joined: Jun 2009
Reputation: 10
Post: #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 all posts by this user Quote this message in a reply
Alroc Offline
Junior Member

Posts: 24
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 545
Joined: Jun 2009
Reputation: 10
Post: #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 all posts by this user Quote this message in a reply
Alroc Offline
Junior Member

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

So sad Sad ...
09-19-2010 01:22 AM
Find all posts by this user Quote this message in a reply
nofsky Offline
Senior Member

Posts: 423
Joined: Sep 2008
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
gosseyn Offline
Member

Posts: 63
Joined: Sep 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
gosseyn Offline
Member

Posts: 63
Joined: Sep 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)