-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Projectile has y coord that is always twice as much as it should be.
E.g. if I fire a projectile and print out it's position immedietIy I get the following output:
Position: 1003 -1336
projectile: 990.5,-2692.5
So either player or projectile has wrong scale for y coord.
Is this the culprit?
class AdapterCoordY(Adapter):
"""Converts X coordinate from a uint16 to the range +-16384
Although the default map only uses a +-8192 vertical range"""
def _encode(self, obj, ctx):
return (obj * 2) + 32768
def _decode(self, obj, ctx):
return (obj - 32768) / 2.0I don't understand why some coord updates are using AdapterCoordX/Y and some are using AdapterCoord24.
Metadata
Metadata
Assignees
Labels
No labels