3D Movement Keyss

Blitz3D Forums/Blitz3D Userlibs/3D Movement Keyss

;up arrow
if keydown(200) moveentity camera,0,0,0.2
;down arrow
if keydown(208) moveentity camera,0,0,-0.2
;left arrow
if keydown(203) moveentity camera,0,-0.2,0
;right arrow
if keydown(205) moveentity camera,0,0.2,0


AJ00200

?

ummm... thiking of something sarcastic... I can tell you put quite a lot of work into this! you should sell it instead of making it free... (no hard feelings but I dont see how this is a library???)

I dont think this qualifies as a user library does it?

..........?

You should consider selling it man! I mean...wow!

well, you know. I don't like to brag, but I made 50$ off it 2 days ago.

well, you know. I don't like to brag, but I made 50$ off it 2 days ago.
I'd wager a large amount of money that you're lying, since you aren't even selling this..... "user lib". That and the code is wrong. Who would want the left/right arrow keys to move the camera up and down?

There's also a plagiarism question mark since thousands upon thousands of people have written identical code already.

As a "user lib", its ridiculous enough. But please don't embarrass yourself by trying to convince everyone its some magical bit of code that some loony has paid money for.

well GfK, it was you who gave me the 50$

..this is kind a interesting now..

Should this be moved to CodeArchives or something?
Despite it being pretty much useless unless you have

A Global camera entity
The entity should move in units of 2 only, irrespective of delta-time
As GfK mentions too, the left/right keys move this entity up and down whilst up/down moves it foorward/backwards

Way too specific to be of much use to anyone I think.

well GfK, it was you who gave me the 50$
That's right. I stole your paper round money.

There is a couple of people who spring to mind, who would actually have bought this.

You're right Naughty Alien. This is getting interesting :D

Fixed It
;up arrow
If KeyDown(200) MoveEntity camera,0,0,0.2
;down arrow
If KeyDown(208) MoveEntity camera,0,0,-0.2
;left arrow
If KeyDown(203) MoveEntity camera,-0.2,0,0
;right arrow
If KeyDown(205) MoveEntity camera,0.2,0,0


WHO WANTS TO BUY IT?

And what are you charging for this fine piece of technology, my good man?

Here: 49$
Now hand it over.

..i'm quite surprised how come mods haven't locked this useless thread so far..

I think he's getting $50 with each of our post's
so, here are mine!

Juan

I'LL BUY IT!!!!!!!!

Fixed It

Well.. that's alright then :D

function 3DmovementKeys(speed, camera)
;up arrow
If KeyDown(200) MoveEntity camera,0,0,speed
;down arrow
If KeyDown(208) MoveEntity camera,0,0,-speed
;left arrow
If KeyDown(203) MoveEntity camera,-speed,0,0
;right arrow
If KeyDown(205) MoveEntity camera,speed,0,0
end function


The new updated version comes with handcuff keys (thats for you Malice)

try this:

Graphics3D 800, 600, 32, 2

AmbientLight 255, 255, 255

Global cam = CreateCamera()

PositionEntity cam, 0, 1, -4

CameraRange cam, .1, 100000000

Global sky = CreateSphere(50)

EntityColor sky, 68, 207, 252

ScaleEntity sky, 1000000, 1000000, 1000000

FlipMesh sky

Global cube = CreateCube()

EntityAlpha cube, .5

PositionEntity cube, 0, 1, 0

EntityShininess cube, .5

EntityColor cube, 102, 102, 255

Global land = CreatePlane()

EntityColor land, 128, 128, 128

While Not KeyHit(1)

PositionEntity sky, EntityX(cam), EntityY(sky), EntityZ(cam)

movement(cam, 0.1, 1)

UpdateWorld
RenderWorld

Text 0, 0, EntityX(cam)
Text 0, 10, EntityY(cam)
Text 0, 20, EntityZ(cam)
Text 0, 30, EntityYaw(cam)

Flip
Wend

Function movement(camera, mspeed#, tspeed#)

MoveEntity camera, 0, 0, ((KeyDown(200)-KeyDown(208))*mspeed#)
TurnEntity camera, 0, ((KeyDown(203)-KeyDown(205))*tspeed#), 0

End Function