tshirtbooth help with constrain

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
Hey tshirtboot, could you help me with a constrain problem? I am trying to spawn an actor from the top of the screen and when it hits an actor at the bottom of the screen, stop and spawn the same actor from the top again and then when that hits the actor that was previously spawned, it stops. I have that working fine, but now I want to be able to rotate those objects around the actor at the bottom. I have that all working except when the actor spawns it make the one below it disappear because of the constrain I have on the self.position.x and self.position.y. But I don't know how else to get them to rotate the right way. I know your good at this stuff, any thoughts? Thanks.
SM

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    SamMan I really think you are constraining them to the same spot, like I said in the other thread. Have T shirt booth look at that and see what he thinks. He may have an even easier method of setting a unique ID. Good luck!
  • RedlerTechRedlerTech Member Posts: 1,583
    I think you would get more help if you asked the community not one member...
  • jb15jb15 Member Posts: 602
    Maybe it's just me--but I'm kinda confused. Could you label each actor, (I have actor a and actor b, rotating around actor c) and talk about what behaviors you're using?

    As someone who's asked many questions on this forum, that's my suggestion (sorry I can't actually just answer your question)
  • SAMmanSAMman Member Posts: 228
    I appreciate the feedback. basically here is what I have setup. Actor 1 is at the bottom of the screen, when I click it rotates 90 degrees. In actor 1 I have 3 constrains in the actor. constrain global X, Y and Rotate. They are constrained to the Actor 1 values self.position.X, Y and the Actor's rotation. I have an actor2 that starts at the top of the screen. Actor moves down to collide with the bottom actor1. When actor2 collides with Actor1, actor2 spawns actor3 and actor2 is destroyed on collision. Actor3 is spawned in the same place actor2 was and actor3 is constrained to match the global values X,Y and rotate. basically, one block at a time I am trying to build up a kind of a tower made up of single blocks that rotate around the first block. This is hard to explain I guess.
  • SAMmanSAMman Member Posts: 228
    I guess basically, I have no idea how to figure this out. can anyone help? thanks
    SM
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Do you want actor 3 to be located exactly over actor 1? If you constrain it with the same x,y and rotation as actor 1 that is what you get.

    I am going to assume you really want the bottom edge of actor 3 to look like it is sitting on the top edge of actor 1

    I think what you want is to "change attribute" x,y and rotation of actor 3 (not constrain). And you probably don't want the y value of actor 3 to be exactly the same as actor 1. Instead, you want the y value of actor 3 make it look like actor 3 is just touching the top of actor 1.

    Then you want actor 3 to orbit around actor 1 as it (actor 1) rotates. It will be a very tight orbit -- exactly the distance that makes it just touch the edge of actor 1. But to the user, it will appear that the edges of both actor 3 and actor 1 are welded together.

    Is that close to what you are trying to achieve?
Sign In or Register to comment.