Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / More Vector3 Commands [Free Code!]

Author
Message
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 10th Sep 2016 05:50 Edited at: 22nd May 2019 23:52
Here are a few extra Vector3 commands. Enjoy!

To go along with: https://www.appgamekit.com/documentation/Reference/Maths.htm

Attachments

Login to view attachments
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 10th Sep 2016 06:56 Edited at: 10th Sep 2016 08:51
Trying to make CreateVector3Copy( Destination , Source )

Is it possible to create a Var using a VarString as the name?

Example1:


Example2:
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Sep 2016 08:29
Quote: "Is it possible to create a Var using a VarString as the name?"

if you not using #option_explicit
the compiler create them for your with the type you will assign or the return value from function.
it seems you will convert a vector into a string there.
something like this?
myVar$ =VectorToString(CreateVector(0,0,0))
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 10th Sep 2016 08:56 Edited at: 10th Sep 2016 21:46
I'm not sure I follow. What is VectorToString()?


I've made an alternative to CreateVector3Copy()

You must create an empty Vector3 before using it, or have a Vector3 that you want to copy into.
Example:
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 10th Sep 2016 23:52 Edited at: 22nd May 2019 00:05
Here's another one:

Scale a vector to a specific length, similar to Normalize except you can use any length rather then just "1.0"
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 22nd May 2019 01:00
Updated OP. I think these commands/functions cover everything I need.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd May 2019 01:04 Edited at: 22nd May 2019 01:05
That looks great!
Nieb
10
Years of Service
User Offline
Joined: 13th May 2014
Location: Lurking
Posted: 22nd May 2019 23:54 Edited at: 2nd Jun 2019 23:39
Thanks.
Updated again, added SetVector3FromPitchYaw().

Login to post a reply

Server time is: 2024-11-22 21:49:25
Your offset time is: 2024-11-22 21:49:25