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 - KrayZee

Pages: [1]
1
General / collision detection sprite vs vertexarray
« on: June 21, 2013, 11:24:21 am »
heyho i am new to sfml, so i have some questions.
 i am programming a 2d rpg with a topdown-view, and what i ve done so far is working how it have to.
now i am at a point where i am not getting further. i have a map which is an vertex array. it is not rly tilebased because instead of many many 32x32 quads, i stored in the vertexarray "objects"(parts of an texture-like a table) which position and size is pixelorientated. so every vertex is an object-quad. all information about position and texture is stored in an xml file. in this xml file is also defined wether the vertex should collid or not and here starts the problem.
i have a sprite which contains the playertexture and is moving around.

how can i make it that this sprite can collide with the collidable vertices.

i havent any code yet to post so i hope u understand my problem and can show me some examples.

im sorry for the bad english

Pages: [1]