Author Topic: Moveable camera fixed on center point  (Read 1521 times)

Is there any way I can make a view that rotates around a center, fixed point, and have it controllable by the user?

The Camera mod has an "Observe" view, I believe.

The Camera mod has an "Observe" view, I believe.
If you're talking about that event mod, it was badly made and I want a proper example on it.

I usually try to stay away from referring to other games, but is this like the 3rd view type in Minecraft where you face your player?

I usually try to stay away from referring to other games, but is this like the 3rd view type in Minecraft where you face your player?
Kind of, the camera would rotate around the object at a constant distance, essentially moving on a sphere around the object.

Woah, hold on, there are 2 camera mods.
Are you talking about the movable cameras or the simpler mod?

Woah, hold on, there are 2 camera mods.
Are you talking about the movable cameras or the simpler mod?
There are 2 camera mods?
:o

And I mean the camera is moved by the mouse, so movable.

%cam.setMode("Corpse", %obj);

SWAT is saying "mod." I think he means "mode."

%cam.setMode("Corpse", %obj);
I'll give this a try, and that does make more sense lug :p

SWAT is saying "mod." I think he means "mode."
No.  I meant mod.  I was wondering which Event Mod he was referring to.

Hey Ip, I hope this helps you out a bit. My math skills are terrible so I won't attempt to steer you in the wrong direction as you'll notice below, lol.


function setCameraOnPoint(%client , %point)
{   
   %distance = 10;
   %camera = %client.camera;
   %camera.setOrbitPointMode(%point , %distance);
   %camera.rotatePoint(%point);
   %client.setControlObject(%camera);
}

function camera::rotatePoint(%this , %point)
{
   //Trig math and loop
   //~~~~~~~~~~~~~~~~~~
   
   //~~~~~~~~~~~~~~~~~~
}