Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
284
members |
114
snippets
Search for:
ALL
POPULAR
File Controls
Multiplayer Code
2D Effects
3D Effects
Oldskool demos
Basic Functions
Maths/Physics
Sound
Tutorials
Misc
Username:
Password:
Sign up
DeltaRoll by Stevie G
[
back
]
Author:
Archive
| Viewed:
513
times | Language:
BlitzBasic 3D
| Category:
Maths/Physics
Graphics3D 640,480,16,1 Global Camera = CreateCamera() : PositionEntity Camera, 0, 0, -30 Global Ship = CreateCone(): ScaleMesh Ship, 1, 2, 1 : EntityColor Ship, 0,0,255 Global Target = CreateCube() : EntityColor Target,255,0,0 Repeat If KeyHit( 57 ) PositionEntity target, Rand(-20,20 ), Rand(-20,20 ), 10 EndIf DR# = DELTAroll( Ship, Target ) TurnEntity ship, 0, 0, DR * .01 RenderWorld() Text 0,0,DR Flip Until KeyDown(1) ;================================================================================= ;================================================================================= ;================================================================================= Function DELTAroll#( Source , Target ) TFormPoint 0,0,0 , Target, Source Return VectorYaw ( TFormedX() , 0 , TFormedY() ) End Function
Author Comments:
Returns the roll angle between two entities
Login or
create an account
to comment on this snippet