Jump to content
Atavism Online

Trying to toggle mouse look in soft targeting mode, but not sure what I'm doing..


war40k
 Share

Recommended Posts

There is logic in the script of the SDETargeting.cs

/*
 * USAGE NOTES
 * In Atavism3dPersonInput, make these public:
 * 		Make mouseLookLocked public (can hide in inspector)
 * 		Make cameraTargetOffset public
 * 		Make cameraFirstPerson public (but hide in inspector)
 * 
 * In Atavism3rdPersonInput, add a public SDETargeting variable
 * In its Start method, check if the variable is null
 * if it isn't, create an SDETargeting component and add it to the Atavism3rdPersonInput's game object
 * 
 * Additionally, the UpdateVisualCursor method must be changed (just one part) so soft targeting can hide the default cursor
 * You must add 
 * || sdeTarget.softTargetMode 
 * to the if statement so it is properly hidden.
 * 
 * Original:
 * ----------------------------------------------------------------
 * if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) )
 * ----------------------------------------------------------------
 * 
 * 
 * 
 * Example Start Code:
 * ===================================================================
 * 	sdeTarget = camera.gameObject.GetComponent<SDETargeting> ();
	if (sdeTarget == null) {
		sdeTarget = camera.gameObject.AddComponent<SDETargeting> ();
		sdeTarget.A3PI = this;
	}
	===================================================================
 */ 

// Camera code is from this Project:
// http://unity3d.com/support/resources/example-projects/3rdpersonshooter
// Thank you guys.

// Add this script to the main camera.
// In the inspector, there is a variable "player" - drag your player on it.
// Press Play!

It sounds like it should be easy to setup but I don't know anything about coding without breaking something, and I know something will break. How do I make it so I can disable the cursor from appearing and interacting with the GUI when the player is trying to use skills etc. Some older versions of atavism seem to do it easily. Has someone done this before?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recommended Cloud Solution


    northnetworking.com

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.