minib3d : CameraPick dont works anymore

Monkey Programming Forums/User Modules/minib3d : CameraPick dont works anymore

Vignoli(Posted 2014) [#1]
Hi,

I've opened an old program compiled with an old MonkeyX + minib3d after updating all to the last versions, and now "CameraPick(camera,mousex(),mousey()" returns always nothing, even with objects behind the mouse.

Any idea ?

EDIT:
I have the 78h version of monkeyXpro, and minib3d is for 78g. Anything i can do ?


AdamRedwoods(Posted 2014) [#2]
will look into this, i am working on miniB3D problems today.


Vignoli(Posted 2014) [#3]
thanks


Cocopino(Posted 2014) [#4]
Hi, is this still causing problems?
When I run the code below, Camerapick stops working as soon as the cube has moved a little:

format_codebox('
Import minib3d

Function Main()
New Game
End

Class Game Extends App

Field cam:TCamera
Field cube:TMesh
Field init_gl:Bool = False
Field update:Int

Method OnCreate()
SetUpdateRate 30
SetRender()
End

Method Init:Bool()

If init_gl Then Return True
If Not TPixmap.PreLoadPixmap(["mojo_font.png"]) Then Return False

init_gl = True

cam = CreateCamera()
CameraClsColor(cam, 100, 100, 200)
cam.PositionEntity 0.5, 1, -5

cube = CreateCube()
cube.NameEntity("Cube 1")
cube.EntityPickMode(2)

Print "main: init done"
Return True

End

Method OnUpdate()

If KeyHit(KEY_CLOSE) Or KeyHit(KEY_ESCAPE) Then Error ""
If Not Init() Then Return

If TouchDown(0)

Local e:TEntity = cam.CameraPick(TouchX(), TouchY())

If Not e Then
Print update + " null pick"
Else
Print update + " " + e.classname + " " + e.EntityName()
EndIf

EndIf

update += 1

If (update Mod 50) = 0
cube.MoveEntity(0, 0.2, 0)
EndIf

'If (update Mod 50) = 0
' cam.MoveEntity(0, 0.5, 0)
' cam.PointEntity(cube)
'EndIf

End

Method OnRender()

If Not Init() Then Return
RenderWorld()

End
End
')

Thanks!


Cocopino(Posted 2014) [#5]
@Vignoli

Since you're mentioning "anymore" in your title I assume you used to have an older version of minib3d in which camerapicks were working?
Do you know which version that was?

Thanks!