ROJOhound;
I think your approximation to buoyancy works quite well. The four internal points is a very clever and it is short and simple and not hard to fit into my game.
Thanks again.
yours
winkr7
You might check that persist and no save are set the same for parent and child. If it is set for one and not the other there may be a conflict.
Thanks ROJOhound;
I will take a look.
Hello all;
I am using the physics model and I want to know if anyone has tried to do floating objects. If I assume the water surface is a line and I have a physics object that over laps that line then some of it is out of the water. I want to calculate the area of the sprite that is below water level to get how much upward force to apply. Just an approximation would be good as a start. I can do it for a sphere, but an polygon is a little complicated--especially if I try to consider center of buoyancy vs center of mass. Has anyone tried to do something similar?
thanks for your time.
Develop games in your browser. Powerful, performant & highly capable.
Put the collision points slightly inside the sprite instead of at the edge. If you are using circular collision you can overlay a second sprite that is just the graphic and has no physics.
You do not have permission to view this post
Thankyou ROJOhound.
Thanks ROJOhound. Does this assume the sprite is at angle=0?
Hello;
Does anyone have a function that takes mesh coord (a,b) and stretches it to layout coord x,y. The function will probably have to consider the size and location of the sprite getting stretched etc.
thanks for your time
Make sure player is not solid? Did you check that?
Yes to all five questions--however...
If you a write a game of any size you will need to do some programmer-like thinking about things like variables, and scope and the like. It is ideal for writing a 2d 80s game--but you will have to do work on it.
There is a saying in programming circles that Those that don't use (unix, TCP/IP, families) are doomed to rewrite them. To rewrite what a family does (partly) you can assign each and every single sprite in the game a variable (call it family_type). Then loop on all your sprites and those that have family_type = 4 do your two events.
Member since 23 Oct, 2014