Select object with mouse in bge?


I wish I could select objects in the bge with the mouse (over+click)
Works with the 2 sensors (over + click).

But isn’t it too much for what I need? (I am a curious newby)
That is: numerous agents wander around. I can freeze the scene and modify it (delete/modify…)
So I was thinking: whoww I check the sensor every frame x nber agents.
Why not: when in freeze mode, I cast a ray and check the hitObject and click status? (could not find how to send a ray)
Or should I create/remove the sensors when I freeze/restart?

Thanks for your advice,

I do not really understand what you want.

For selection you can use Simple selection.

You can’t use mouse over within a suspended scene. It is suspended and will not evaluate any system events.
You can indeed use a Python controller to cast rays through a suspended scene. Indeed this requires some Python and BGE API knowledge.

1.We can’t really understand what you mean there.
2.From what I “understand” , you can’t achieve what you want , (freezing scene and doing things )