Myst Movement

Blitz3D Forums/Blitz3D Programming/Myst Movement

Fuller(Posted 2006) [#1]
I'm having some trouble with myst-style movement (like myst I or Riven)

if you move into a wall it will disrupt the "grid" movement and you can rotate the camera too far

Small example:
Code and Media

Help!


kevin8084(Posted 2006) [#2]
your collisions are set to sliding, I believe. That would disrupt the "grid" movement.


Fuller(Posted 2006) [#3]
Ok, thats better but I should be able to "pick" the banner and view it, and I can't get linepicking to work to place the camera above the floor.


kevin8084(Posted 2006) [#4]
I don't think that you can pick a sprite, Fuller. I tried your code with a cube in place of the sprite and it worked fine. For the linepicking to place your camera, you need to make the temple pickable.


Fuller(Posted 2006) [#5]
Stupid me about the picking, but I didn't know about not being able to pick a sprite.
So I create a custom mesh instead,i suppose


kevin8084(Posted 2006) [#6]
That would be your best bet. Good luck :)


Fuller(Posted 2006) [#7]
The texture doesnt come out correct when i create a mesh with two triangles


kevin8084(Posted 2006) [#8]
Did you check your U/V coordinates when creating the triangles?


Fuller(Posted 2006) [#9]
no, I'm not exactly sure how to do that...


kevin8084(Posted 2006) [#10]
The upper-left corner of your image is U/V coordinate 0,0. The upper-right is 1,0. The lower-right is 1,1. The lower-left is 0,1

Graphics3D 800,600
SetBuffer BackBuffer()


mesh=CreateMesh()
surf=CreateSurface(mesh)
v0=AddVertex(surf,0,0,0,0,1)
v1=AddVertex(surf,0,1,0,0,0)
v2=AddVertex(surf,1,1,0,1,0)
v3=AddVertex(surf,1,0,0,1,1)
AddTriangle(surf,v0,v1,v2)
AddTriangle(surf,v0,v2,v3)

texture=LoadTexture("banner1.jpg")
EntityTexture mesh,texture

PositionEntity mesh,0,0,3

camera=CreateCamera()
PositionEntity camera,0,0,0

While Not KeyHit(1)

UpdateWorld
RenderWorld
Flip
Delay 10
Wend
End