-
Posts
258 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by diedir
-
-
brillant idea Rick, hope you get people in
i would like but find no time at the moment...
perhaps later.
great move
-
i saw that from Aggror :
Script.target = "" --entity "Target waypoint" Script.offset = Vec3(0,1,-2) --Vec3 "Offset" Script.smoothen = Vec3(5,5,5) --Vec3 Smoothen Script.enabled = true --bool Enabled function Script:Start() if self.target == nil then Debug:Error("The follow script does not have a target.") end end function Script:UpdateWorld() if self.enabled then local x = Math:Curve((self.target:GetPosition(true).x + self.offset.x), self.entity:GetPosition(true).x, self.smoothen.x / Time:GetSpeed()) local y = Math:Curve((self.target:GetPosition(true).y + self.offset.y), self.entity:GetPosition(true).y, self.smoothen.y / Time:GetSpeed()) local z = Math:Curve((self.target:GetPosition(true).z + self.offset.z), self.entity:GetPosition(true).z, self.smoothen.z / Time:GetSpeed()) self.entity:SetPosition(Vec3(x,y,z)) end end
not tried but sure it will work
-
Hi all
interesting topic, just a request :
having a slow motion tutorial in lua
would be great
thank you
-
thanks Shadmar
great job !
-
versions are totally different it is upgrading not just updating,
so yes you have to !
-
thank you for precision, Josh
-
Hi all,
just to clarify things,
what main differences we would expect between Leadwerks 3.1 and Steam Lua version ?
beside the LUA only with steam (no exe compile as it stands)
e.g. should we expect Deferred rendering too ?
a classical comparison between the two would be great to decide where to go.
thank you
-
@franck
Yes it was! Amazing land and atmosphere !
Very good job, the engine is clearly brighting here
-
I don't know if it is my phone but video is blocking at 1:13 pity because it is really nice till there !
-
very impressive job, so curious how much difficult is integrating PhysX3 in Le2 ?
can we hope you share some day the process you did ?
How far are you from the "when it's done" thing about your game ?
anyway so much good work landed here !
congrats
-
-
no offense here
just a matter of saying...
anyway i need to resolve myself to make the move...
just convincing me to do it atm.
-
ok then,
i can understand that,
but your assessment :
And even if it wasn't it would not happen anywaysounds quite a morbid statement,
thanx and amen
-
good to know that Cassius,
the ticket for that is LE3 license, then a scripts/assets transfer and new methods though,
i am comfort in my LE2 shoes, for now
just hoping that LE2 could recieve newton physics 3
-
Hi beo6
thank you for answering,
missing or not found, i don't know but some are bugging me :
- vehicle braking command
- more stable physics collisions between rigidbodies (vhs) and static meshes
currently, i don't know why but my car is not driving straight (turning a bit then a lot after a while) when not turning, only
when speed is high ...
edit: i think it is my car structure because it is the only one which does this.
so that's my concerns for now
thx
- vehicle braking command
-
Hi all,
some questions about physics :
1) is Newton game dynamics driving LE 2.5 and LE 3.0 physics?
2) which version of Newton in each LE version ?
3) the stable 3.0 version of Newton is out, could we have it integrated in LE 2.5 ?
thank you
have a nice day
-
all caracters put in code == game done....
- 2
-
@Rick
is this :
Engine.Destory();
destroy the destiny of history ?
or recreate the history of destiny ?
sorry for this i'm out -->
-
Thanks for your presence here, Pixel,
always among clever topics,spreading your ideas and tips.
Wish you the best.
Family is important, but , hey we are family here, no?
-
Hi couldn't upload here because it is not my program
but i give you a link to download the zip file "ADN.zip" that i uploaded on a free cloud place.
hope you got it (only one month available there)
cheers
-
hi everyone
playing with fc3 too really funny and fluid game even if you need some fix mods to get rid of the spoiling radar
better after when you don't know what's around the corner.
having fun with it on christmas holidays, cool!
sure Crysis1 was really good but the superman nanosuit and aliens ruined all the fun...
and happy new year by the way
-
-
i put this in my "car.lua" :
and it is working
require("Scripts/class") require("Scripts/loop") require("Scripts/math/math") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:UpdateMatrix() self:UpdateTires() end function object:UpdateTires() local speed for n=0,3 do if self.tire[n]~=nil then self.tire[n]:SetMatrix( self.vehicle:GetTireMatrix(n) ) if self.emitter[n]~=nil then self.emitter[n]:SetMatrix(self.vehicle:GetTireMatrix(n)) self.emitter[n]:Pause() if self.vehicle:TireIsAirborne(n)==0 then speed = math.abs(self.model:GetVelocity(0).z) speed = (speed - 4) / 20.0 --20 speed = Clamp( speed, 0, 1 ) * 0.5 if speed>0.2 then -->0 self.emitter[n]:Resume() self.emitter[n]:SetColorf(1,1,1,speed) end end end end end end --local couronne local pivot local suspensionlength=0.2 --0.1 --0.2big local springconstant=280 --280 --70big local springdamper=500 --600 --220big object.vehicle=CreateVehicle(object.model) object.tire={} object.emitter={} pivot=object.model:FindChild("roue_avg") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[0]=LoadMesh("abstract::roue_avg.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("roue_avd") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[1]=LoadMesh("abstract::roue_avd.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("roue_arg") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[2]=LoadMesh("abstract::roue_arg.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("roue_ard") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[3]=LoadMesh("abstract::roue_ard.gmf",object.model) pivot:Hide() end --object.emitter={} --object:UpdateTires() --[[setWorld(fw.transparency.world) for n=0,3 do if object.tire[n]~=nil then --createemitter(50,2000,Vec3... object.emitter[n]=CreateEmitter(1,100,Vec3(0,1,0),0,object.tire[n]) object.emitter[n]:SetPosition(Vec3(0,-object.tire[n].aabb.h/2.0,0)) object.emitter[n]:SetParent(model,1) object.emitter[n]:SetRadius(0,2) --1.6 object.emitter[n]:SetWaver(0.1) --1.0 object.emitter[n]:Paint(LoadMaterial('abstract::dust.mat')) object.emitter[n]:SetRotationSpeed(0.1) object.emitter[n]:Pause() end end SetWorld(fw.main.world) ]]-- -- object.model.buoyant=0 object.model:SetMass(2.6) --big2.20 object.model:SetFriction(0.9,0.9) --0.6,0.3 object.model:SetKey("Gravity",1) object.model:SetKey("collisiontype",COLLISION_PROP) ---object:UpdateTires() end
in my folder i have the model gmf (with chassis as the parent of all pieces) and wheels (4 in my case)
and in mycarDriver.lua :
require("Scripts/constants/keycodes") require("Scripts/linkedlist") require("Scripts/filesystem") require("Scripts/math/math") require("Scripts/constants/engine_const") FlushKeys() HideMouse() local camera = fw.main.camera chassis=LoadModel("abstract::car_9.gmf") carobject=objecttable[chassis] car=carobject.vehicle if car==nil then Notify("Vehicle object not found.",1) chassis:Free() return end chassis:SetPosition(TFormPoint(Vec3(0,1,4),fw.main.camera,nil)) chassis:SetRotationf(0,camera.rotation.y+180.0,0) --Variables local dx=0.0 local dy=0.0 local camerapitch=camera.rotation.x local camerayaw=camera.rotation.y local move=0.0 local strafe=0.0 local steering = 0.0 local torque = 0.0 --0 local steerlimit = 30.0 local steerrate = 2.0 local steerangle=0.0 MoveMouse(Round(GraphicsWidth()/2),Round(GraphicsHeight()/2)) while KeyHit(KEY_ESCAPE)==0 do --Camera look --[[ gx=Round(GraphicsWidth()/2) gy=Round(GraphicsHeight()/2) dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed()) dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed()) MoveMouse(gx,gy) camerapitch=camerapitch+dy camerayaw=camerayaw-dx camerapitch=math.min(camerapitch,90) camerapitch=math.max(camerapitch,-90) fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1) ]]-- local tirespeed=-(KeyDown(KEY_UP)-KeyDown(KEY_DOWN))*6.0 --2 vitesse origine car:AddTireTorque(tirespeed,0) car:AddTireTorque(tirespeed,1) car:AddTireTorque(tirespeed,2) car:AddTireTorque(tirespeed,3) steermode=0 if KeyDown(KEY_RIGHT)==1 then steermode=steermode-1 end if KeyDown(KEY_LEFT)==1 then steermode=steermode+1 end if steermode==1 then steerangle=steerangle+4.0*AppSpeed() elseif steermode==-1 then steerangle=steerangle-4.0*AppSpeed() else if steerangle>0 then steerangle=steerangle-4.0*AppSpeed() if steerangle<0.0 then steerangle=0.0 end else steerangle=steerangle+4.0*AppSpeed() if steerangle>0.0 then steerangle=0.0 end end end steerangle=Clamp(steerangle,-25,25) car:SetSteerAngle(steerangle,0) car:SetSteerAngle(steerangle,1) ---didier retourne vehicule if KeyDown(KEY_SPACE)==1 then ---chassis:SetRotationf(0,180.0,0) marche a peu pres chassis:SetRotation(Vec3(0,180,0)) -- marche mieux end-- ---fin didier fw:Update() local campos=TFormPoint(Vec3(0,1,0),chassis,nil) fw.main.camera:SetPosition(campos) fw.main.camera:Move(Vec3(0,0,-8)) ---position camera derriere vh local t=TFormVector(Vec3(0,0,1),camera,chassis) a=-math.deg(math.atan2(t.x,t.z))+180.0 fw.main.camera:SetRotation(Vec3(15,CurveAngle(180+chassis.rotation.y,fw.main.camera.rotation.y,10),0)) --carobject.turret:SetRotationf(0,CurveAngle(a,carobject.turret.rotation.y,10.0/AppSpeed()),0) chassis:Hide() local pick = LinePick(campos,camera.position,0.5,COLLISION_PROP) chassis:Show() if pick~=nil then camera:SetPosition(pick.position) end fw:Render() Flip(0) end chassis:Free() chassis=nil camera=nil ShowMouse()
-
Hi ithink you miss some lines i did :
steerangle=Clamp(steerangle,-25,25) --25 here max angle car:SetSteerAngle(steerangle,0) car:SetSteerAngle(steerangle,1)
hopeit was what you look for
Does 3.3 influences 2.5 version ?
in Programming
Posted
Hi
sorry to bother with old things...
but with the two versions of LE on the same PC /Win8.1 since a month or two some weird things happen
with my lua code.
My lua code worked "perfectly" few weeks ago in V. 2.5,
some time before i try to create a test level in 3.3 (coincidence ?),
and now, without any change in code, my AI code seems going crazy (e.g. not working as i want)
my code refers to "math.atan", "math.atan2" and "math.pi" functions too.
as anyone have same behavior with 2.5 ?
(am i paranoid ?) no need to answer this one...
thanks