How do I…
Make the pupils look to cursor, but limited within white eyes?
What is the expected result
It should look to cursor and limited in border of eyes
What is the actual result
It just look still, not looking to eyes
Make the pupils look to cursor, but limited within white eyes?
It should look to cursor and limited in border of eyes
It just look still, not looking to eyes
Eye is frame
Bullet is left pupil
Ballz is right pupil
This will make each pupil follow cursor exactly to its position
This i do not have time to finish
Somewhere i need to shove in to subtract Ballz.Width() and Height()
But i can’t find where exactly in the formula
However bottom line it works and it will make pupils follow cursor relatively to cursor position on screen
Right now it will work only for right pupil
When i get back i try to fix it t o work only inside eye
It is only matter of placing -Ballz.Width() and Height()
In correct spot in formula maybe everything needs to be inside () while -Ballz.Width() and Height() outside
I write this info so maybe you can try to find it
If not i should be back in few hours
Eye.X()+Eye.Width()/CameraWidth()*DistanceBetweenPositions(CameraBorderLeft(),0,CursorX(),0)
This is the code i actually wanted (first one), but the square i mentioned is 64x64
EyeS: 50x32
Pupils: 42x12
And the square is movable, so its a player
Ok, actually nevermind, now how do I make a hand limited to block’s radius, rotating toward the cursor and move toward to the cursor
I found where to put width and height
Eye.X()+(Eye.Width()-Bullet.Width())/CameraWidth()*DistanceBetweenPositions(CameraBorderLeft(),0,CursorX(),0)
Eye.Y()+(Eye.Height()-Bullet.Height())/CameraHeight()*DistanceBetweenPositions(0,CameraBorderTop(),0,CursorY())
And i do not understand either of your above messages
So imagine the red circle is zone for rotating hand, and it must point to cursor while rotating around the block
There is action PUT OBJECT AROUND ANOTHER OBJECT or something like that
Use it to do put hand around yellow box
And under it add another action to rotate hand toward CursorX() CursorY() at speed 0
what if i actually want to make hand rotate around the block?
What if dont want the hand just beside square, but also spin around with cursor?
In put object around another you have field to specify angle
Put there variable and just change variable to whatever angle you want
If you want hand to spin there around cursor to box position then put there (i mean in that angle) YellowBox.AngleToPosition(CursorX(),CursorY())
I mean to make the hand spin around the block while pointing to cursor
For example, the hand is 180 degree pointing to cursor while the hand is beside on left. It changes direction whenever the cursor move around.
What i wrote in previous message (2nd part) will point hand toward cursor and always position hand between box and cursor
(1st part) is if you want to control where hand spins around box by something else than cursor
And for that you would use variable and you can manipulate that variable at will
Thanks, but i still need one more question, how do i make the hand hold object whilst moving in circular?
For example, revolver in the hand. I tried to make the hand hold the handle, but it just keep moving in wrong way.
Can’t you just make 2 animations
One for hand not holding gun and other for hand holding gun?
if I were to have two weapon, how i am going to switch weapon without the hand changing position in frames
I do not understand?
Two weapons in one hand?
Or switch weapons in hand? Cause this would be just another frame of animation for hand
i mean switching weapons without hand changing position on the pixels
And why hand would change position in such situation?
I really do not get your problem
If you make animation for arm holding sword and another for holding gun you do not change position of arm but just of weapon
sure but take this problem
Imagine you decide to point the weapon to vertical up, then by just slightly moving to left, the hand just teleported to flip the weapon.
the first event above was what i meant.