-
Posts
214 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by awgsknite
-
-
-
-
Thanks !
but i tried that and the other line that changes to corners = { } or the other way
corners = {Vec3(), Vec3(), Vec3(), Vec3()}
and then it gives an error at the start of this near = :
--// corners = position + left/right offset + forward + right
corners[ 0 ] = pos + ( rht * footOffset ) + ( fwd * footprintSize.y * 0.5 ) + ( -rht * footprintSize.x * 0.5 ); // Upper Left
corners[ 1 ] = pos + ( rht * footOffset ) + ( fwd * footprintSize.y * 0.5 ) + ( rht * footprintSize.x * 0.5 ); // Upper Right
corners[ 2 ] = pos + ( rht * footOffset ) + ( -fwd * footprintSize.y * 0.5 ) + ( -rht * footprintSize.x * 0.5 ); // Lower Left
corners[ 3 ] = pos + ( rht * footOffset ) + ( -fwd * footprintSize.y * 0.5 ) + ( rht * footprintSize.x * 0.5 ); // Lower Right
-
not really cos i want to make the treadmarks as i ride the skidoo
-
Like i said b4 the function part. This line:
public function AddFootprint( pos : Vector3, fwd : Vector3, rht : Vector3, footprintType : int )
-
Thanks !
but idk what to use but this is the first part of it:
public function AddFootprint( pos : Vector3, fwd : Vector3, rht : Vector3, footprintType : int )
{
// - Calculate the 4 corners -
// foot offset
var footOffset : float = footprintSpacing;
if ( isLeft )
{
footOffset = -footprintSpacing;
}
var corners : Vector3[] = new Vector3[ 4 ];
// corners = position + left/right offset + forward + right
corners[ 0 ] = pos + ( rht * footOffset ) + ( fwd * footprintSize.y * 0.5 ) + ( -rht * footprintSize.x * 0.5 ); // Upper Left
corners[ 1 ] = pos + ( rht * footOffset ) + ( fwd * footprintSize.y * 0.5 ) + ( rht * footprintSize.x * 0.5 ); // Upper Right
corners[ 2 ] = pos + ( rht * footOffset ) + ( -fwd * footprintSize.y * 0.5 ) + ( -rht * footprintSize.x * 0.5 ); // Lower Left
corners[ 3 ] = pos + ( rht * footOffset ) + ( -fwd * footprintSize.y * 0.5 ) + ( rht * footprintSize.x * 0.5 ); // Lower Right
That function idk how to write that for lua. It has me so stumped and i cant find any lua script that looks like that to see how to make it
-
var corners : Vector3[] = new Vector3[ 4 ];
to Lua How ?
Vector3 is Vec3 in Lua but what about the square brackets and colon ?
-
Are terrain indents possible to be happening ingame ?
Like say a skidoo goes through the snow terrain and makes indents in the terrain or imprints like real tread tracks like tire tracks from a car.
How does one do this if it is possible ? What code would work ?
-
ah thats why..Thanks !
-
stuck on this part:
anyone know how to convert this to lua ? :
switch( footprintType )
case 1 :
uvOffset = Vec2( 0.5, 1.0 )
break
case 2 :
-
np anyways 'cos I got the footstep sounds now !
Now I'm working on placing footprints on terrain. Real tuff it is still to get the proper code for that one !
-
Thanks aiaf ! I learnt some new things from there ! One of them: global variables are ordinary variables !
After taking those tutorials it says that I'm a Lua expert ! On the tutorials page found here: http://www.leadwerks.com/werkspace/page/tutorials/
but I still can't place decals in my game yet lol so I don't feel like an expert just yet
-
Does anyone know of a js to lua converter ? I seen some sln projects on github that are too complex for me to use even though they have some instructions. I'm not an expert with lua yet so I'm trying to convert some js to lua scripts by myself with no success.
-
Thanks Thirsty !
i just sent a PM sent to him
-
Thanks all !
I ended up using simple triggers 'cos it's much easier for me and as I heard that raycasting is performance heavy anyways.
but i guess i'll have to use raycasting for the footprint decals
-
Thanks !
-
ok so how do I go about making the code that says if the player steps on terrain ? if TT ? if GetTexture ? or what is that code ?
-
I'm getting tired of these concrete footsteps sounds when walking on terrain and snow,etc..They all sound the same on all surfaces.
It doesn't make the game playable. How does one go about this idea of different footstep sounds ? I did a search here on the forums that didn't give a good answer. I read one post where it said maybe use triggered zones and another post saying use raycasting. What one is best ? Raycasting would just use the picking code in the player.lua and just make an if statement there to see what material it is ? or how ?
-
i cant post my map cos its the game im working on
-
i got the red color back thanks ! but this navmesh is not working still
-
Hey all ! After a long time away from here I've just came back but after i got my update on steam my healthbars and lettering are all black now ! Also i just tried to get my navmesh to work and it dont. I erased the navmesh cos i was making my level bigger but now i cant get a navmesh in it. I followed the steps to go to the build navmesh settings and nothing appears no light blue material showing and no ai is moving. Guess i have to make a new level then and start over ? or is there a way to fix this ?
-
yeah it seems to be the same bug
-
wouldn't think that would be too good for performance wise though.
I didn't have a choice. Every time I tried to load a prefab and parent it to the player it would load the prefab in different places and not in the center of the screen. It does not seem to have any performance issues yet anyways
-
That is pretty damn awesome, how did you manage to do it?
Thanks !
he instant a prefab and rotates it
nope.. I tried that and it failed. So i did it the easiest way. Maybe you can figure it out ?
Oh yeah maybe you can't 'cos you never tried so I'll tell you : I just parent each inventory item infront of the player and show / hide at the precise moments using FlowGUI
js to lua
in Programming
Posted
nvm it was the material.
I had copied another material instead of making a new material.