Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Mötley on May 26, 2017, 12:17 AM

Title: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on May 26, 2017, 12:17 AM
I would like to know where one could learn how to use this algorithm.

I read through the vcmp search forum and could not find anything.
Tried Google, I think I found it, but I want to be sure instead of wasting my time.

https://en.wikipedia.org/wiki/Euler_angles

If this is correct and someone wouldn't mind leading me to more documentation that would be great

*Just trying to build a Pay n Sray system

Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: EK.IceFlake on May 26, 2017, 04:55 AM
To start with, Euler angles are not an algorithm.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on May 26, 2017, 10:53 AM
The reason I said algorithm is because it requires geometry :).

Unless I'm reading the wrong documentation ;)

Hopefully from what your saying it requires no math :D.
*I hate math
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Thijn on May 26, 2017, 10:54 AM
What do you need help with?
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on May 26, 2017, 11:01 AM
Thank you :)

I don't understand this Euler.

I can set the garage door object. But I don't know what I'm supposed to do to get it from the angles open and closed.

Is there a read only value that I can achieve?

I really don't know how to ask this in general.

How would you set/get the Euler rotation to open and close garage doors​ Thijn
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: EK.IceFlake on May 26, 2017, 12:48 PM
Quote from: TurboGrafx on May 26, 2017, 11:01 AMThank you :)

I don't understand this Euler.

I can set the garage door object. But I don't know what I'm supposed to do to get it from the angles open and closed.

Is there a read only value that I can achieve?

I really don't know how to ask this in general.

How would you set/get the Euler rotation to open and close garage doors​ Thijn
Instead of trying to calculate this manually you might want to look into a map editor.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: NicusorN5 on May 26, 2017, 12:56 PM
Quote from: EK.IceFlake on May 26, 2017, 12:48 PM
Quote from: TurboGrafx on May 26, 2017, 11:01 AMThank you :)

I don't understand this Euler.

I can set the garage door object. But I don't know what I'm supposed to do to get it from the angles open and closed.

Is there a read only value that I can achieve?

I really don't know how to ask this in general.

How would you set/get the Euler rotation to open and close garage doors​ Thijn
Instead of trying to calculate this manually you might want to look into a map editor.
I tried this with MEd. It sucks, cuz' It gives me the wrong rotation in vcmp.

Also xyz in vc are fucked up. It works like xzy lmao.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: EK.IceFlake on May 26, 2017, 01:11 PM
Quote from: NicusorN5 on May 26, 2017, 12:56 PM
Quote from: EK.IceFlake on May 26, 2017, 12:48 PM
Quote from: TurboGrafx on May 26, 2017, 11:01 AMThank you :)

I don't understand this Euler.

I can set the garage door object. But I don't know what I'm supposed to do to get it from the angles open and closed.

Is there a read only value that I can achieve?

I really don't know how to ask this in general.

How would you set/get the Euler rotation to open and close garage doors​ Thijn
Instead of trying to calculate this manually you might want to look into a map editor.
I tried this with MEd. It sucks, cuz' It gives me the wrong rotation in vcmp.

Also xyz in vc are fucked up. It works like xzy lmao.
I'm talking about something along the lines of this (https://forum.vc-mp.org/?topic=532.0).
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: kennedyarz on May 26, 2017, 01:24 PM
Quote from: NicusorN5 on May 26, 2017, 12:56 PM
Quote from: EK.IceFlake on May 26, 2017, 12:48 PM
Quote from: TurboGrafx on May 26, 2017, 11:01 AMThank you :)

I don't understand this Euler.

I can set the garage door object. But I don't know what I'm supposed to do to get it from the angles open and closed.

Is there a read only value that I can achieve?

I really don't know how to ask this in general.

How would you set/get the Euler rotation to open and close garage doors​ Thijn
Instead of trying to calculate this manually you might want to look into a map editor.
I tried this with MEd. It sucks, cuz' It gives me the wrong rotation in vcmp.

Also xyz in vc are fucked up. It works like xzy lmao.

Not bad. Only people believe that wherever the player looks is their angle [+ X]. If the player looks at the angle [-X] he thinks he is looking at [+ X]. Friends is not like Vcmp only works with angles of your world, same thing happens in all games. I say it this way When the player is at an angle that matches the position [Y] moves an object to [+ Y] moves the object forward of the same "wow, it is perfect, but if it is placed at the opposite angle To that position And I mean [-Y] and Suman [+ Y] the object is moving behind the player and it will be bad for you but you are not seeing that you before change angle .. What would be good movement that makes the Object but you say it is bad because you look ahead and instead of the object going to the front when you are adding goes back ... friend everything is fine, just needs a good class and is not math, it is about the angles. I'm sorry for my English
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: DizzasTeR on May 28, 2017, 08:13 AM
@TurboGrafx You can try this Map Editor (http://forum.vc-mp.org/?topic=1303.0) as well. The one Ice Flake recommended or this one should be WAY better to use than any other mapping tool.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on Jun 01, 2017, 07:38 PM
Thank you @Doom_Kill3R :)

I wanted a break for a while so I could think more clear and sadly forgot all about this post. I was Reading documentation about there's one that returns a read only value of Euler angle or whatever, I have it documented just cant remember the name.



Luckily there are more usages in other areas for studying this method like Unity engines if I read correctly. But...

 ???I feel like we should be able to have a .Rotation added to the object class, Just saying, Calling for 90 degree rotations etc
local Object = CreateObject( "Just an example" );
Object.RotateTo(degrees);
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: DizzasTeR on Jun 01, 2017, 07:50 PM
You can do that. EulerRotation is very simple. Rotation is something else. EulerRotation is based on Vector3 (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Vector) class where as the .Rotation is Quaternion (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Quaternion)

So something like
local obj = CreateObject(...);
obj.EulerRotation.z = 90;

/* Further more
obj.EulerRotation = Vecotor( rotationX, rotationY, rotationZ );
*/

If that's not what you're asking then I've no idea about your question.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on Jun 01, 2017, 07:54 PM
Yes,
Last thing, Is there a method to set the speed, Sorry I don't see anything about it.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: DizzasTeR on Jun 01, 2017, 07:54 PM
Quote from: TurboGrafx on Jun 01, 2017, 07:54 PMYes,
Last thing, Is there a method to set the speed, Sorry I don't see anything about it.

Speed of what?
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on Jun 01, 2017, 07:57 PM
Objects moving. Example doors, Garage doors.
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: DizzasTeR on Jun 01, 2017, 07:58 PM
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Object.MoveTo
Title: Re: [Requesting Help] Documentation of RotateToEuler
Post by: Mötley on Jun 01, 2017, 07:59 PM
Just seen that as well time intervals, Sorry i got mixed up

Everything is solved :)

Locked