Scripts / Rotate entity

Author
Message
Tingalls
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2013
Location: Great Northwest, USA
Posted: 19th Dec 2014 14:13
I wrote a script to rotate a bridge. The script works fine except it rotates the material not the mesh. I'm using --> setRotation(e,x,y,z). After the rotation of say 90 degrees I can walk right through the bridge that I see and fall into the river. But when I go to where the original bridge was I can walk across it but cant see it.
I've tried other items and many settings but they all do the same thing. Any ideas???

Experiencing a cool Game --> Tingalls



Win 7 Home Premium, 64bit(srvPack 1),AMD FX 4100 Quad-core 3.8Ghz @ 8Gb Ram - NVIDIA GeForce GTX 750 Ti @ 2GB Ram
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Dec 2014 19:13
Whenever you move or rotate an object you normally lose collision. I have found it works fine afterwards though. Perhaps try CollisionOff(e) before rotating and CollisionOn(e) afterwards? Not entirely sure this will have any effect, but is all I can think of off the top of my head.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 19th Dec 2014 20:08
Interesting, this might explain some issues I've been having with the command.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Tingalls
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2013
Location: Great Northwest, USA
Posted: 19th Dec 2014 22:27
Quote: "Perhaps try CollisionOff(e) before rotating and CollisionOn(e) afterwards?"


@DVader
That was my first thought with the collision, but that didn't work. I hope that it works correctly with v1.009.
I'm still trying to figure it out

Experiencing a cool Game --> Tingalls



Win 7 Home Premium, 64bit(srvPack 1),AMD FX 4100 Quad-core 3.8Ghz @ 8Gb Ram - NVIDIA GeForce GTX 750 Ti @ 2GB Ram
Tingalls
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2013
Location: Great Northwest, USA
Posted: 20th Dec 2014 17:25 Edited at: 20th Dec 2014 23:20
I finally got it resolved -- Example:



CollisionOff(e)

GravityOff(e)

SetRotation(e,0,90,0)

CollisionOn(e)

GravityOn(e)



Seems to work fine now....



Thanks DVader for getting my brain to click...)



UPDATE: With Beta v1.009 it works DVader's way - CollisionOff then CollisionOn - not sure why - but it works now

Experiencing a cool Game --> Tingalls



Win 7 Home Premium, 64bit(srvPack 1),AMD FX 4100 Quad-core 3.8Ghz @ 8Gb Ram - NVIDIA GeForce GTX 750 Ti @ 2GB Ram

Login to post a reply

Server time is: 2024-12-21 18:08:56
Your offset time is: 2024-12-21 18:08:56