Villain Dino needs help with code!

helpwithcode

#1

Hi,I need help with 2 codes that I want to do it in a project.
1. How to make a character (example.Circle) go around another character (example.square)
2. Idk how to explain this. How to make an object point towards out last touch X/Y. Please check @IShallNotBeNamed project 'Simple Animated Eye' cos the moving eye is exactly what I mean

Please explain it to me clearly. Thanks!
-Villain Dino

Peeps:
@FoodDelivery
@KVJ
@Madi_Hopscotch_


#2

Hi! I Don't Understand Number 2 Either, But Maybe I Can Help With Number 1? What Do You Mean By Circle Around Square?


#3
  1. Use sin and cos for that! The last bubble for either x or y should be for the object the rotating object's x or y position!
  2. Do you mean like in ISNBN's project (moving around to your x/y pos), or like, setting its angle so it looks like it points to your last touch position?

#4

1.Thanks!
2.Yup!
@GysvANDRegulus


#5

Okay, so it's a simple ((last touch _ - object _ position) / a number) + _ where object is originally!
Last Touch _ - Object _ position (_s have to be the same) equals the distance between your last touch _ and the object's _ position!
It's divided by a number which fits into the dimensions you want (the bigger it is, the smaller dimensions the object is going to move around) because I don't really know how much the object moves around!
The (+ _ where object is originally is) is for the center of the object, so the object doesn't do weird stuff!


#6

Thanks @GysvANDRegulus
I'll be sure to add you on teh credits!


#7

Somebody knows point towards.


#8

I can help with both.
1. Simple sin and cos with some added values. You can look it up in HS.
2. Copy mine, or I'll help. Here's the main code, edit it to customize:


#9

Thanks ISNBN! I'll be sure to add you in teh credits.