Object to follow cursor

How do I get an object to follow the mouse around the screen?
Like in an RTS when you are about to place a building and it follows your mouse until you click.
That’s not exactly what I want to do, but I know you need python to do that, and I’m a n00b at python, so what commands would I use to do that?
Better yet where’s the list of all the BGE python commands and what they mean?
What the heck is “vector” in BGE python?

Thanks.

PS: I’ll be less annoying if you point me at a really good advanced BGE python tutorial.

You could make a script that sets the object’s position to where the mouse ray lands.

any idea how to write a script like that?

Hmmm…

Mouse’s ray…

Is there anything you can’t do in BGE?

I will run a search for it now.

Wait!

I already have a .blend which does what I need.
I was presented with it on these forums to explain something I needed to do. It will also tell me how to do what I want to do now.

Thanks to whoever it was who presented me with that .blend!

Would love to see the blend if it’s ok to share it. :slight_smile:

me too! please… I know the theory for how to do it with python just have little experience using the get ray postion for the mouse cursor.

http://www.blendenzo.com/tutCustomCursors.html

It works for objects, too, not just cursors.

Oops - Double Post…

That blend I was talking about has nothing to do with cursors, but it does use rays and stuff.

There are two reasons why I can’t share it:

  1. I don’t remember who gave it to me so I don’t know who’s permission to ask.

  2. I don’t know of any sites where I can upload files for free.

I do, however, have a custom cursor blend file that is pretty much like blendenzo’s. I made it from scratch before I read his tut. And it’s better than his because it has color-changing monkeys!!
I just don’t know where I can host it.

Any ideas?

You can upload it here

Thanks, Blendenzo

Thanks! That is the perfect site! I will upload it soon (once I get it ready).

Color-changing monkeys?!?! I’ve been outdone!