newbe question about rotation

LoadingZeroLoadingZero Member Posts: 75
edited November -1 in Working with GS (Mac)
Hi All,

if i have a circular object like a ball and in my scene some oblique walls (left and right) i must write a rule for make the ball rotate clockwise if collide with a oblique left wall and another for the right counter-clockwise or there's a tricky trick!?
Thank's

Comments

  • ORBZORBZ Member Posts: 1,304
    i'm not clear: are you looking for realistic behavior? if so the physics engine should do all that for you automatically. However, if you want specific rotation rules based on which direction the ball is traveling then what I would do is check the linear velocity x and if it's negative rotate counter-clockwise and if it's positive rotate clockwise.
  • LoadingZeroLoadingZero Member Posts: 75
    thank's orbz.
    Now physic does not help me, when the "ball" fall and get oblique wall does not rotate but fall follow the wall. Am i doing something wrong?
    Oki for the rules, i've think about it and i've draft something similar, but now i'm curious about the physic :D
  • ORBZORBZ Member Posts: 1,304
    i do not understand
  • LoadingZeroLoadingZero Member Posts: 75
    Mhmmm ok :d
    my "ball" as a accellerate rules for gravity, when fall and collide with a wall it bounce with it (circular collision) but do not rotate in any direction, follow the wall and fall down.
    There some physic option i miss?

    Ok merging my rules and your int i can solve the problem, but i would like to know if i could make it with physical attribute.
  • creativeappscreativeapps Member Posts: 1,770
    I dont understand clearly But I think you do not want to move your wall. Goto wall properties and uncheck Movable.
  • LoadingZeroLoadingZero Member Posts: 75
    mhmmm nono walls are unmovable.
    ok.... let's try in simple way.
    There some trick to make a ball like actor to rotate when collide with an oblique stuff without using rules?
  • LoadingZeroLoadingZero Member Posts: 75
    BTW now i've create a set of rules that check:
    if linearvelocity X > 10 and actor collide with wall rotate clockwise at hmmm 200 speed
    if linearvelocity X > 10 and actor collide with other actor rotate clockwise at hmmm 100 speed
    if linearvelocity X >=0 && <=10 and actor collide with wall rotate clockwise at hmmm 60 speed
    if linearvelocity X >=0 && <=10 and actor collide with other actor rotate clockwise at hmmm 60 speed
    The same with negative values for rotate under clockwise.

    i've also check if the 4 kind of linearVelocityX when actor NOT collide with anithing but if my "ball" don't collide with anything (for example fall down from a wall) it won't rotate.
    Someone can explain me which attribute i must check if the ball don't collide with anything?
  • LoadingZeroLoadingZero Member Posts: 75
    mhmmm make a mistake, i must check my linearVelocityY for up to down fall :D
Sign In or Register to comment.