Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Pepsi

Pages: [1]
1
Thanks for help/feedback. :)

2
eXpl0it3r , Thanks for fast replays :)

Quote
do just change it's position or also it's size?
i change both (x,y) and the (W, H) of the new REct

Quote
You should keep the size of the rect always the same
well my sprite have different dimension in some frames, that's why I'm having problem to where set the origin, since the move, setposition depend on the origin point of the sprite.

Is it good to have the origin point at (W,H)? it has side effect on scale function , but it will help in solving the problem of having the sprite off the floor ?

3
yeah that's what I did,
the problem appears in crunch mode (when user press down button) the character goes up the surface , crunch should be on the surface/ floor

Animating 2D character is what I'm doing as Following:
- have x.png conains all the frames
- use setTextureRect(size) to get appropriate frame
- set origin
- move / or dont move
- draw

4
Greeting,


let's assume i have character that has 7 frames in walking mode, and 2 in crunch mode.

the frames in crunch mode is almost half size of walking mode rectangle.

now if i set  all the frames (walking+crunch) to its center (0.5 of W , 0.5 of H), i will face problem in Set position function => the character is not on the surface in crunch mode.

so what is the best point to set Character origin point?

Thanks

Pages: [1]
anything