[bb] Verlet Physics (incomplete) by Nate the Great [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:40

Previous topic - Next topic

BlitzBot

Title : Verlet Physics (incomplete)
Author : Nate the Great
Posted : 1+ years ago

Description : This is a very helpful physics engine which I have spent a few weeks on.  I plan to use it to add little physics effects to my games so I don't have to use a hugely complex physics system.  I also like to have an idea of how every aspect of my game works.

I will give a lot of credit to stevie g and pongo for advising me on how to do certain things while making it.  :)
The demonstraintion below uses the arrow keys to simulate an air hockey table.

P.S.  It has many bugs but I will leave those for you to sort out if you really need it in a game :)   also you don't have to give me credit but mentioning my name in the credits or emailing me if you use it in a game would be nice.


Code :
Code (blitzbasic) Select
Graphics3D 640,480,0,2
SeedRnd(MilliSecs())




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Temporary camera stuff;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

piv = CreatePivot()
cam = CreateCamera(piv)
;CameraRange cam,.01,50
CameraZoom cam,2
MoveEntity cam,0,3,-30
lit = CreateLight()
TurnEntity lit,90,0,0

TurnEntity piv,20,0,0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




Global VerletType = 1 ;Collision Types
Global RBodyType = 2
Global RigidBodyNum = 0
Global groundtype = 3

;Collisions VerletType,RBodyType,2,2   ;Sets Collision Types
;Collisions VerletType,VerletType,1,2
Collisions verletType,GroundType,2,2

Type Verlet ;Verlet type Contains:
Field Active ;Determines if the verlet is an active verlet or a verlet used for orientation
Field Mass# ;Gives the verlet a mass
Field x#,y#,z# ;Gives the verlet an x,y,z cooridnate
Field vx#,vy#,vz# ;Gives the verlet a velocity in 3d
Field ox#,oy#,oz# ;Stores the old x,y,z coordinates to figure out the velocity of the verlet
Field piv,ent ;Gives the verlet a pivot point and names the verlet's entity
Field Col,ID,piv2,radius# ;Col tells if the verlet has collided yet and ID tells what entity and verlet group the verlet belongs to
End Type

Type Constraint ;Constraints constrain the verlets to certain distances from eachother
Field v1.verlet ;First verlet in constraint
Field v2.verlet ;Second verlet in constraint
Field length# ;Length of the constraint
End Type

Type Rigidbody ;Rigidbody is used as a reference for all of the verlets that belong to a mesh
Field Ent ;Ent is the entity that is acting as the rigid body
Field ID ;ID is the ID that all of the verlets in this mesh are attatched to
Field x#,y#,z# ;X,Y,Z coordinates of the mesh
Field Yaw#,pitch#,Roll# ;Yaw,Pitch,Roll coordinates of the mesh
Field lf.verlet,lb.verlet,rf.verlet,rb.verlet ;The verlets that are inactive and are used to orient the mesh
Field lfd.verlet,lbd.verlet,rfd.verlet,rbd.verlet;The verlets that are inactive and are used to orient the mesh
Field c.verlet,idl ;The central Verlet
Field Verl.verlet[50],verlnum
End Type





SetBuffer BackBuffer()

ground = CreatePlane()
EntityColor ground,32,32,64
EntityAlpha ground,.9
EntityType ground,GroundType



rwall = CreateCube()
ScaleEntity rwall,.1,.8,10
MoveEntity rwall,5,.1,0

EntityType rwall,GroundType

lwall = CreateCube()
ScaleEntity lwall,.1,.8,10
MoveEntity lwall,-5,.1,0

EntityType lwall,GroundType

bwall = CreateCube()
ScaleEntity bwall,5,.8,.1
MoveEntity bwall,0,.1,-10

EntityType bwall,GroundType

fwall = CreateCube()
ScaleEntity fwall,5,.8,.1
MoveEntity fwall,0,.1,10

EntityType fwall,GroundType


obstacle = CreateCylinder(10)
MoveEntity obstacle,0,0,5

EntityType obstacle,GroundType


puck = CreateCylinder(8)
MoveEntity puck,0,.8,0
ScaleEntity puck,.3,.1,.3

applyphysics(puck,10,False,.2)



pl1 = CreateCylinder(10)
MoveEntity pl1,0,.8,-4
ScaleEntity pl1,.5,.2,.5
EntityColor pl1,255,0,0

applyphysics(pl1,10,False,.2)

CreateMirror()





timer = MilliSecs()

cnter = 0
While Not KeyDown(1)
Cls


If KeyDown(205) Then PApplyForce(pl1,.015,0,0)
If KeyDown(203) Then PApplyForce(pl1,-.015,0,0)
If KeyDown(200) Then PApplyForce(pl1,0,0,.015)
If KeyDown(208) Then PApplyForce(pl1,0,0,-.015)



UpdateVerlets()

UpdateConstraints()

DrawVerlets()

UpdateWorld()
detectcollisions()

drawverlets()

positionPhysicsEntity()

RenderWorld()

cnt = 0
For v.verlet = Each verlet
cnt = cnt + 1
Next

Text 1,1,cnt

cnter = cnter + 1
Text 1,20,"FPS: "+1000/((MilliSecs()-timer)/cnter)

Flip
Wend
End




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Creates a verlet bounding box & creates verlets;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Function ApplyPhysics(ent,mass#,stationary,verlsize# = .3)

rigidbodynum = rigidbodynum + 1


;Creates the Rigidbody that all of the verlets are linked to

r.rigidbody = New rigidbody
rid = rigidbodynum
rent = ent
rx# = EntityX(rent)
ry# = EntityY(rent)
rz# = EntityZ(rent)
ryaw# = EntityYaw(rent)
rpitch# = EntityPitch(rent)
roll# = EntityRoll(rent)
EntityType rent,RBodyType
ridl = stationary

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;






;Loops through all surfaces and verticies
For k = 1 To CountSurfaces(ent)
surf = GetSurface(ent,k)
For index = 0 To CountVertices(surf)-1
TFormPoint VertexX(surf,index), VertexY(surf, index),VertexZ(surf, index), ent, 0
CreateVerlet(TFormedX(),TFormedY(),TFormedZ(),mass#,ent,rID,True,verlsize#)   ;Creates a verlet for every vertice  Later it deletes duplicate verlets for the sake of stability.
Next
Next

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;Creates the bounding box verlets that don't react with anything but are used to orient the mesh

rlf.verlet = CreateVerlet(rx# - .5 , ry# - .5, rz# + .5, 1 , ent , rID , False)

rlb.verlet = CreateVerlet(rx# - .5 , ry# - .5, rz# - .5, 1 , ent , rID , False)

rf.verlet = CreateVerlet(rx# + .5 , ry# - .5, rz# + .5, 1 , ent , rID , False)

rb.verlet = CreateVerlet(rx# + .5 , ry# - .5, rz# - .5, 1 , ent , rID , False)

rlfd.verlet = CreateVerlet(rx# - .5 , ry# + .5, rz# + .5, 1 , ent , rID , False)

rlbd.verlet = CreateVerlet(rx# - .5 , ry# + .5, rz# - .5, 1 , ent , rID , False)

rfd.verlet = CreateVerlet(rx# + .5 , ry# + .5, rz# + .5, 1 , ent , rID , False)

rbd.verlet = CreateVerlet(rx# + .5 , ry# + .5, rz# - .5, 1 , ent , rID , False)

rc.verlet = CreateVerlet(rx# , ry# , rz#, 1 , ent , rID , False)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;Deletes Duplicate verlets so that the meshes are more stable

For v.verlet = Each verlet
For vv.verlet = Each verlet
If vvID = vID Then
If vvpiv <> vpiv Then
If vx# = vvx# And vy# = vvy# And vz# = vvz# And vvmass <> 0 And vmass <> 0 Then
FreeEntity vvpiv
Delete vv.verlet
EndIf
EndIf
EndIf
Next
Next

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




cnt = 0
For v.verlet = Each verlet
If Vent = ent And VActive = True Then
RVerl.verlet[cnt] = v.verlet
cnt = cnt + 1
EndIf
Next

rVerlnum = cnt - 1


;This code makes constraints which it links every inside verlet to all eight of the outside verlets but no others

For v.verlet = Each verlet
If vID = rigidbodynum Then
If ridl = False Then
If vactive = True Then
Createconstraint(v.verlet,rf.verlet)              ;Creates constraint
Createconstraint(v.verlet,rb.verlet)
Createconstraint(v.verlet,rlf.verlet)
Createconstraint(v.verlet,rlb.verlet)
Createconstraint(v.verlet,rfd.verlet)              ;Creates constraint
Createconstraint(v.verlet,rbd.verlet)
Createconstraint(v.verlet,rlfd.verlet)
Createconstraint(v.verlet,rlbd.verlet)
Createconstraint(v.verlet,rc.verlet)

EndIf
EndIf
EndIf
Next
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




createconstraint(rf.verlet,rc.verlet)
createconstraint(rb.verlet,rc.verlet)
createconstraint(rlf.verlet,rc.verlet)
createconstraint(rlb.verlet,rc.verlet)
createconstraint(rfd.verlet,rc.verlet)
createconstraint(rbd.verlet,rc.verlet)
createconstraint(rlfd.verlet,rc.verlet)
createconstraint(rlbd.verlet,rc.verlet)

createconstraint(rf.verlet,rb.verlet)
createconstraint(rf.verlet,rlf.verlet)
createconstraint(rf.verlet,rlb.verlet)

createconstraint(rb.verlet,rlb.verlet)
createconstraint(rb.verlet,rlf.verlet)

createconstraint(rlf.verlet,rlb.verlet)


createconstraint(rfd.verlet,rbd.verlet)
createconstraint(rfd.verlet,rlfd.verlet)
createconstraint(rfd.verlet,rlbd.verlet)

createconstraint(rbd.verlet,rlbd.verlet)
createconstraint(rbd.verlet,rlfd.verlet)

createconstraint(rlfd.verlet,rlbd.verlet)


createconstraint(rf.verlet,rfd.verlet)
createconstraint(rlf.verlet,rlfd.verlet)
createconstraint(rb.verlet,rbd.verlet)
createconstraint(rlb.verlet,rlbd.verlet)

;Deletes duplicate Or reversed constraints  This speeds up the constraint loops very much

For c.constraint = Each constraint
For cc.constraint = Each constraint
If cv1piv = ccv1piv And cv2piv = cv1piv Then
Delete cc.constraint
EndIf
Next
Next


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;





End Function














;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Creates a verlet at the given x,y,z coordinate;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Function createverlet.verlet(x#,y#,z#,mass#,ent,ID,Active,radius# = .1)

v.Verlet = New Verlet
vx# = x#
vy# = y#
vz# = z#
vox# = vx#
voy# = vy#
voz# = vz#
vvx# = 0
vvy# = 0
vvz# = 0
vent = ent
vID = ID
vactive = Active
vmass# = mass#
vadius# = radius#

vpiv = CreatePivot()
vpiv2 = CreatePivot()
ScaleEntity vpiv,.2,.2,.2
PositionEntity vpiv,vx#,vy#,vz#

If active = True Then
EntityType vpiv,VerletType
EntityRadius vpiv,radius#
EndIf

Return v
End Function

















;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Constrains two verlets together;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Function CreateConstraint(v1.verlet,v2.verlet)

c.constraint = New constraint
cv1.verlet = v1.verlet
cv2.verlet = v2.verlet
clength# = Sqr((cv1x#-cv2x#)^2 + (cv1y#-cv2y#)^2 + (cv1z#-cv2z#)^2)

End Function
























;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;goes through every verlet and updates it;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function Updateverlets()

For v.verlet = Each verlet

If vcol = True Then
vcol = False
fric# = .95
Else
fric# = 1
EndIf

vvx# = (vx# - vox#)*fric#
vvy# = (vy# - voy#)*fric#
vvz# = (vz# - voz#)*fric#

vox# = vx#
voy# = vy#
voz# = vz#

vx# = vx# + vvx#
vy# = vy# + vvy# - .004
vz# = vz# + vvz#


For vv.verlet = Each verlet
If v <> vv And vid <> vvid; if not the same verlet or group
dx# = vx# - vvx#
dy# = vy# - vvy#
dz# = vz# - vvz#
dist# = Sqr ( dx#*dx# + dy#*dy# + dz#*dz# )
totalr# = vadius# + vvadius#
If dist# < totalr# Then


Diffx# = ( dist# - totalr# ) * ( dx# / dist# )
Diffy# = ( dist# - totalr# ) * ( dy# / dist# )
Diffz# = ( dist# - totalr# ) * ( dz# / dist# )

vx# = vx# - Diffx# ;* .5
vy# = vy# - Diffy# ;* .5
vz# = vz# - Diffz# ;* .5

vvx# = vvx# + Diffx# ;* .5
vvy# = vvy# + Diffy# ;* .5
vvz# = vvz# + Diffz# ;* .5
EndIf
EndIf
Next

; If vy# < 0 Then
; vy# = 0
; vcol = True
; EndIf

Next

End Function






















;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;goes through every constraint and updates it;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function UpdateConstraints()

For i = 1 To 3

For c.constraint = Each constraint
mx# = ( cv1x# - cv2x# )
my# = ( cv1y# - cv2y# )
mz# = ( cv1z# - cv2z# )

dist# = Sqr( (mx)^2 + (my)^2 + (mz)^2 )

mx# = mx# / 2
my# = my# / 2
mz# = mz# / 2

If dist# <> 0  Then
dif# = (dist# - clength#) / dist# * .7
EndIf

; If cv1col = False Or i > 5 Then
cv1x# = cv1x# - dif# * mx#
cv1y# = cv1y# - dif# * my#
cv1z# = cv1z# - dif# * mz#
; EndIf
; If cv2col = False Or i > 5 Then
cv2x# = cv2x# + dif# * mx#
cv2y# = cv2y# + dif# * my#
cv2z# = cv2z# + dif# * mz#
; EndIf
Next

Next

End Function



















;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;positions all verlets;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function Drawverlets()

For v.verlet = Each verlet

PositionEntity vpiv,vx#,vy#,vz#

Next

End Function


















;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;positions all meshes;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function PositionPhysicsEntity()

For r.rigidbody = Each rigidbody
PositionEntity rent,EntityX(rcpiv),EntityY(rcpiv),EntityZ(rcpiv)

;align mesh to verlet cage
x# = EntityX( rfpiv ) - EntityX( rlfpiv ) + EntityX( rbpiv ) - EntityX( rlbpiv )
y# = EntityY( rfpiv ) - EntityY( rlfpiv ) + EntityY( rbpiv ) - EntityY( rlbpiv )
z# = EntityZ( rfpiv ) - EntityZ( rlfpiv ) + EntityZ( rbpiv ) - EntityZ( rlbpiv )
AlignToVector rent, x#,y#,z#,1  
x# = EntityX( rfpiv ) - EntityX( rbpiv ) + EntityX( rlfpiv ) - EntityX( rlbpiv )
y# = EntityY( rfpiv ) - EntityY( rbpiv ) + EntityY( rlfpiv ) - EntityY( rlbpiv )
z# = EntityZ( rfpiv ) - EntityZ( rbpiv ) + EntityZ( rlfpiv ) - EntityZ( rlbpiv )
AlignToVector rent, x#,y#,z#, 3
Next

End Function





















;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;tests all verlets for collisions;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Function Detectcollisions()

For v.verlet = Each verlet
If EntityX(vpiv) <> vx# Then
If EntityCollided(vpiv,3) Then
vcol = True
EndIf
vx# = EntityX(vpiv)
EndIf
If EntityY(vpiv) <> vy# Then
If EntityCollided(vpiv,3) Then
vcol = True
EndIf
vy# = EntityY(vpiv)
EndIf
If EntityZ(vpiv) <> vz# Then
If EntityCollided(vpiv,3) Then
vcol = True
EndIf
vz# = EntityZ(vpiv)
EndIf
Next

End Function






;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;applies a force to given object;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Function PApplyForce(ent,x#,y#,z#)

For r.rigidbody = Each rigidbody
If rent = ent Then
For i = 0 To rVerlnum
rverl[i]ox# = rverl[i]ox# - x#
rverl[i]oy# = rverl[i]oy# - y#
rverl[i]oz# = rverl[i]oz# - z#
Next
EndIf
Next

End Function



Function PMoveEntity(ent,x#,y#,z#)

For r.rigidbody = Each rigidbody
If rent = ent Then
For i = 0 To rverlnum
rverl[cnt]ox# = rverl[cnt]ox# + x#
rverl[cnt]oy# = rverl[cnt]oy# + y#
rverl[cnt]oz# = rverl[cnt]oz# + z#
rverl[cnt]x# = rverl[cnt]x# + x#
rverl[cnt]y# = rverl[cnt]y# + y#
rverl[cnt]z# = rverl[cnt]z# + z#
Next
EndIf
Next

End Function



Function PPositionEntity(ent,x#,y#,z#)

For r.rigidbody = Each rigidbody
If rent = ent Then
For i = 0 To rverlnum
rverl[cnt]ox# = x#
rverl[cnt]oy# = y#
rverl[cnt]oz# = z#
rverl[cnt]x# = x#
rverl[cnt]y# = y#
rverl[cnt]z# = z#
Next
EndIf
Next

End Function


Comments :


Ked(Posted 1+ years ago)

 Puki would be proud of your "incomplete" tag at the top.


Nate the Great(Posted 1+ years ago)

 Yes it is incomplete but I probably will not post any more updates because I am currently turning it into a full fledged game.   ;)   I am not sure about the name but it will probably be called Destructo Car (Kindof similare to indestructo tank on addicting games)


KillerX(Posted 1+ years ago)

 Pretty cool.


Nate the Great(Posted 1+ years ago)

 Thanks KillerX


mtnhome3d(Posted 1+ years ago)

 lol i see how this worksthis is fun NTG. good job


Nate the Great(Posted 1+ years ago)

 Thanks Mtnhome3d glad you see how it works... that could be helpful