Are these maths possible in Skyline ?
- Code: Select all
Vector3 v1 = newType.vec3(5,0,5);
Vector3 v2 = newType.vec3(v1) ;
v2.y = v2.y + 5 ;
v1.y = v2.y ;
Vector3 v1 = newType.vec3(5,0,5);
Vector3 v2 = newType.vec3(v1) ;
v2.y = v2.y + 5 ;
v1.y = v2.y ;
lastPos = newType.vec3 ( 0, 0, 0 )
currentDirection = newType.vec3 ( 0, 0, 0 )
x, y, z = entity.getPosition ( obj )
lastPos.x = x
lastPos.y = y
lastPos.z = z
-- obj moves here
entityPos = newType.vec3 ( entity.getPosition ( obj ) )
currentDirection.x = entityPos.x - lastPos.x
currentDirection.y = entityPos.y - lastPos.y
currentDirection.z = entityPos.z - lastPos.z
float vector3::distance ( float vec1_X,
float vec1_Y,
float vec1_Z,
float vec2_X,
float vec2_Y,
float vec2_Z
)
sky.include("yourfile.lua"); -- change yourfile to name of script. Best to keep the script name unique throughout the system aswell.
Vec2 = Vec 1 + vec3 ;
SolarPortal wrote:I think this is something we can come back to later after the release.
c# / c++ was planned, but it takes a lot of work to get them working. c# was planned to be added before c++ as that needs an SDK setup to be able to be used in that manner.
For real performance, you should propose some C# or C++ available implemenation.
StarFire wrote:I would disagree about performance, as once you have 100,s of objects in a scene all running their scripts and the frame rates start to drop lower than 30 fps this will become an issue. Use the most optimized solution on the onset rather than being bottle-necked later in development.
I guess i'll have to create my own Vector 3 functions and include them in Lua code.
Users browsing this forum: Google [Bot] and 6 guests