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

Author Topic: Vector2f Help  (Read 2393 times)

0 Members and 1 Guest are viewing this topic.

Devero

  • Newbie
  • *
  • Posts: 11
    • View Profile
Vector2f Help
« on: November 25, 2011, 06:12:55 am »
Hello Everyone,
I'm in the process of learning c++ and SFML and I've been working on a game in my spare time.
I've recently starting converting everything to using sf::Views and sf::Vector2f's but I've run into two problems I can't seem to figure out:


1.) I can't access the X or Y individually from a Vector2f's (to use in trigonometric calculations) and I'm curious how exactly to do this. I've tried treating it like a normal vector; however, I only receive errors.

2.) In addition, can anyone give advice on making a Vector of Vector2f's?
For example I have 100 Asteroids that each need their own Vector2f. Any examples or links to examples would be unbelievably beneficial as I'm having a hard time finding a relevant article.

Thanks in advance!

ActionBoy

  • Newbie
  • *
  • Posts: 36
    • View Profile
Vector2f Help
« Reply #1 on: November 25, 2011, 07:14:48 am »

Devero

  • Newbie
  • *
  • Posts: 11
    • View Profile
Vector2f Help
« Reply #2 on: November 25, 2011, 06:21:52 pm »
Excellent, thank you so much!