Jump to content
RAGE Multiplayer Community

Spawn a player correctly


Recommended Posts

Question isn't too clear.....

If you moved the player, then the camera is always behind the player anyway (when you're not in First person).

This is in C#, but method should be the same in JS.

https://github.com/horseyhorsey/RageMpClientBase/blob/d7c0e5c44b787870c03df46632365bf1a5cde4fa/src/RageMpClientHelpers/CamHelper.cs#L14

I've used this for a Shop menu. Disable player controls and point camera at the player without creating another camera. (Same as rotating camera with mouse or Pad Stick)

 

  • Like 1
Link to post
Share on other sites
  • 2 weeks later...

I am not sure if this solves the camera problem because I didn't had that, I just had the issue that the hud was not appearing.

My solution was just (in JS)

function spawnPlayer(player, position) {
	player.spawn(position;

	// for some reason I had still to set position sometimes to avoid issues and health
	player.position = position;
	player.health = 100;
}

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...