Be the first to post for 'Click Mouse To Move'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

I could not find a link to download script, looks like it is missing + currently on udemy website ID of this lecture is ‘0’, in Udemy app it is ‘9’

Copied this file from github

1 Like

Good call on getting it from github…i was about to copy it by hand from the video! (except it includes challenge answers :frowning: )

Small problem is GITHUB file has all the changes we suppose to do ourselves as part of challenge.

1 Like

Have a feeling a fix may be on the way or something went borked.

I am guessing the video numbers are out of sequence due to videos being updated possible.

Thanks @Marc_Carlyon, the downloadable resource was indeed missing (@Lucy_Becker note I’m talking about 9_CM_RPG)

I’ve now uploaded it, and deleted the GitHub link to make the challenge harder.

2 Likes

I am a little confused actually ben as i think one of the videos might be the incorrect one.
The video title is “Using Raycast to Query click” but we hear the wonderful Sam’s voice with a primer on References and Pointers.
@ben

Edit :- Yeah confirmed wrong video, I just noticed the big glaring Unreal logo in the corner staring me in the face lol!

@Ben Rather than make a new topic i thought it best to post here.
It might be my end but it appears video 8 (Click mouse to move) and Video 9 (Using raycasts to query click) have uploaded the wrong way round.
I thought i would highlight it in case it hadnt been noticed :slight_smile:

1 Like

Decided to finally start up following the course and I definitely think they are swapped. Click Mouse to Move (currently Lecture 8) seems to be referencing a lot of Raycaster stuff which appears to be done in Lecture 9.

Yes, it appears that the courses are listed in the wrong order. I believe Lecture 8 is “Using Raycasts to Query Click”, and Lecture 9 is “Click Mouse to Move”. I noticed something must be up when Ben’s prefab Camera Arm had some scripts on it that were absent in my project!

good, I thought it was me, they are not in sequence they are even noted as 8 for raycast and 9 for click to move.

Been a few days, thought I forgot what I did already. :confused:

Just to confirm these videos were in the wrong order but should be fine now.

Just a heads up, the 9_CM_RPG Downloads.zip does not seem to exist for video 11 Click Mouse To Move. Could not download it. Had to create the script. No biggie.

Thanks for pointing this out. I’ve checked and it’s there for me. Could it be simply you need to click more as below?

Sorry, should have been more specific. It is there. No more on that one. I simply could not download the zipped file. Tried several times. I have successfully downloaded previous ones, but this will not. Could be my end but if so, no clue why. I simply copy pasted it from github into a new file? Seems I could not find a way to download the .cs.

Thank you.

William

Well heres my cheeky little solution to stopping young Ethan in his tracks when he gets to a certain point near the target destination challenge…

Additions mate to PlayerMovement script.

Spoiler Hidden, just in case you dont want to know

[spoiler]popped this at the top, adjustable just to taste and it looked nice in the inspector lol

[Range(0.01f, 1f)] public float StoppingRange = 0.1f; // the distance threshold to stop character when approaching destination

then added this to the call to the m_Character.Move in FixedUpdate
so getting the absolute distance (float) so the number will always be positive, making a comparison check simpler)
the Mathf.Abs() takes either a float or an Int and returns its unsigned magnitude, thereby always positive

float distanceToTarget = Mathf.Abs( Vector3.Distance(currentClickTarget, transform.position) );
if(distanceToTarget <= StoppingRange) {currentClickTarget = transform.position; }
m_Character.Move(currentClickTarget - transform.position, false, false);[/spoiler]

Hey, I’ve got a weird bug here guys… character doesnt like turning left… if i turn right it is fine, but when i hold down the mouse and try and turn left the dude just sits there and jitters…

any thoughts?

Privacy & Terms