# Finding 3D position between two 3D nodes

## Recommended Posts

This is a pretty basic math question but I'm having trouble with it. Say I have two 3D nodes, n1 and n2, represented by 3D position vectors. How can I find a new position n3 that's between n1 and n2, specified as some distance m from n1?

In 2D space I think this would be

Θ = tan(n2.y - n1.y / n2.x - n1.x)
n3 = [m cos Θ, m sin Θ]

In 3D space I believe we need two of the euler angles but I'm not sure which ones or what to do with them.

(If it makes a difference I'm working with iOS SceneKit.)

Thanks!

##### Share on other sites
n3 = n1+(n2-n1)*m;  (where m is between 0-1)

alternativly if you have a set distance that isn't in 0-1 range.

dis = n2-n1;

alpha = dis/m;

n3 = n1+dis*alpha;

##### Share on other sites

n3 = n1 + specified_distance * (n2 - n1) / length(n2 - n1)

##### Share on other sites

Alvaro, your formula works great. Thanks!

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628642
• Total Posts
2983997
• ### Similar Content

• Who We Are
We are Forged Interactive, a small team of like-minded game developers with the sole purpose of making games we love! Currently, we're progressing very quickly with our first project and there are plenty of opportunities and work for new interested programmers. With this project, our development platform is Unity 5.5.2 and C# as our behavioral language. Since this project is our first release, the game itself is a smaller project though progress is moving quickly. We are looking to finalize the current project and get started on future projects in the near future and are expanding our team to do so.

Who We Are Looking For:
Programmer Level Designer
Ours is the tale of two siblings, thrown into a world of chaos. Living in the shadow of their parents' heroic deeds and their Uncle's colorful military career, Finn and Atia are about to become the next force to shape our world. How will you rise through the ranks of Hereilla and what will be your legacy? Once defeated your enemies turn coat and join you in your adventures. Players can enjoy a range of troops and abilities based on their gameplay style which become more important as maps introduce more challenging terrain, enemies and bosses. Strong orc knights, dangerous shamans, and even a dragon are out on the prowl. Knowing when to fight and when to run, and how to manage your army is essential. Your actions alone decide the fate of this world.

Previous Work by Team
Although we are working towards our first game as Forged Interactive, our team members themselves have worked on titles including and not limited to:
Final Fantasy Kingsglaive FIFA 2017 Xcom 2 Civilization
What do we expect?
Reference work or portfolio. Examples what have you already done and what projects you have worked on academic or otherwise. The ability to commit to the project on a regular basis. If you are going on a two-week trip, we don't mind, but it would be good if you could commit 10+ hours to the project each week. Willingness to work with a royalty based compensation model, you will be paid when the game launches. Openness to learning new tools and techniques

What can we offer?
Continuous support and availability from our side. You have the ability to give design input, and creative say in the development of the game. Shown in credits on websites, in-game and more. Insight and contacts from within the Industry.

Contact
If you are interested in knowing more or joining, please email or PM us on Skype. A member of our management team will reply to you within 48 hours.

E-mail: Recruitment@ForgedInteractive.com
Skype: ForgedInteractive

Regards,
David, Colin and Joseph

Reddit: www.reddit.com/user/Forged_Interactive

• Hello all!   I'm currently in my third year on my 3D Animation & Games Development course, and I am in the process of doing some basic primary research for my dissertation project, which is to create a high quality 3D Environment for use in video games and potentially VR.   I have a questionnaire (targeting other artists in the field), and I would really appreciate it if you took some time to have a look and fill it out:   https://docs.google.com/forms/d/e/1FAIpQLScW12nFI8-fMlAUMNSQvOInxhnIfXpG91iRCm25TVlZufrvbQ/viewform?usp=sf_link   Thank you in advance!   Mike.

•

Game School Online™ Announces Winter Enrollment Open Through December
Los Angeles, CA - December 2017

Free Winter Term Enrollment!
Free Winter Enrollment:
Game School Online™, the first and only free online game development school of its kind, has opened enrollment for the winter term, which begins in January of 2018. GSO™ currently offers curricula in environment art and lighting for games, focusing specifically on Unreal Engine 4. GSO™ will be adding two new courses for the winter term, “Advanced Lighting Concepts with Unreal Engine 4” and “Advanced Hard Surface Modeling.”

Free Workshop!

December Free Workshop:
In addition to winter enrollment, GSO™ will have a free online workshop, “Animating For Games and Movies”, with Veara Suon, Senior Animator at Double Negative. Veara has worked in the AAA games industry, working on franchises like Destiny and Bioshock. Veara also works in the film industry, having worked for famed studios like Weta, ILM, and Sony, contributing to films like Pacific Rim 2, Spiderman, and Avengers. In this month’s free GSO™ workshop, Veara will be discussing topics such as:
Sharing techniques on how he animates for games and film
Advice on how students can get a job in games or film
Advice on how working professionals can switch from games to film, and vice versa
Job relocation
The workshop will last for an hour, with allocated time for Q & A from the audience. The workshop will take place on December 14 at 8pm PST. As usual, our monthly workshops are absolutely free and anyone is welcomed to join us. To RSVP, please visit our Facebook page here: https://www.facebook.com/events/139461393377301/?active_tab=about

Scholars Available For Mentoring!
Scholar Lineup:
Scholars are our mentors, working industry professionals currently working on your favorite games and franchises- here to help you learn to be a professional game dev, with one on one live private sessions. Our current lineup of scholars includes:

Brian Yam - Director of Visual Development @ Section Studios
https://bdyammer.artstation.com/

Olaf Piesche - Senior Engineer @ Epic Games

Kevin DeBolt - World Artist @ 343 Industries
http://kevindebolt.com/index.html

Rosie Katz - Senior Game Designer @ EA, Visceral, Sledgehammer Games
http://www.rosiewrede.com/index.php?nav_bar=level_design

Leo Gonzalez - Senior Artist @ Certain Affinity
https://leog.artstation.com/

Brandon Pham - Lead Environment Artist
https://brandonpham.artstation.com/

We believe that education should be free for everyone! Come join us at Game School Online™ and see what the future of game development education looks like today! For more information about Game School Online™, available courses, scholars, and events, please visit http://gameschoolonline.com/

Discord: https://discordapp.com/invite/BzU5Fq2
Patreon: https://www.patreon.com/gameschoolonline

Game School Online™ is the first ever, completely free game development training program. GSO™ was founded by veteran developers working in the AAA games and entertainment industries. Featuring courses authored by working industry professionals, students are able to learn production techniques and workflows used to ship some of the biggest IPs and AAA franchises. Industry pros known as “scholars”, work with students providing private live sessions to help you become “industry” ready. All courses are available for free, no trials or demos- it’s completely free for anyone that wants to learn how to become a skilled game developer. For more information, please visit our website: http://gameschoolonline.com/
Game School Online™ and GSO™ are registered trademarks Game School Online, LLC. All other brand names, product names or trademarks belong to their respective holders.

Contact
Game School Online, LLC.
info@gameschoolonline.com

View full story

•

Game School Online™ Announces Winter Enrollment Open Through December
Los Angeles, CA - December 2017

Free Winter Term Enrollment!
Free Winter Enrollment:
Game School Online™, the first and only free online game development school of its kind, has opened enrollment for the winter term, which begins in January of 2018. GSO™ currently offers curricula in environment art and lighting for games, focusing specifically on Unreal Engine 4. GSO™ will be adding two new courses for the winter term, “Advanced Lighting Concepts with Unreal Engine 4” and “Advanced Hard Surface Modeling.”

Free Workshop!

December Free Workshop:
In addition to winter enrollment, GSO™ will have a free online workshop, “Animating For Games and Movies”, with Veara Suon, Senior Animator at Double Negative. Veara has worked in the AAA games industry, working on franchises like Destiny and Bioshock. Veara also works in the film industry, having worked for famed studios like Weta, ILM, and Sony, contributing to films like Pacific Rim 2, Spiderman, and Avengers. In this month’s free GSO™ workshop, Veara will be discussing topics such as:
Sharing techniques on how he animates for games and film
Advice on how students can get a job in games or film
Advice on how working professionals can switch from games to film, and vice versa
Job relocation
The workshop will last for an hour, with allocated time for Q & A from the audience. The workshop will take place on December 14 at 8pm PST. As usual, our monthly workshops are absolutely free and anyone is welcomed to join us. To RSVP, please visit our Facebook page here: https://www.facebook.com/events/139461393377301/?active_tab=about

Scholars Available For Mentoring!
Scholar Lineup:
Scholars are our mentors, working industry professionals currently working on your favorite games and franchises- here to help you learn to be a professional game dev, with one on one live private sessions. Our current lineup of scholars includes:

Brian Yam - Director of Visual Development @ Section Studios
https://bdyammer.artstation.com/

Olaf Piesche - Senior Engineer @ Epic Games

Kevin DeBolt - World Artist @ 343 Industries
http://kevindebolt.com/index.html

Rosie Katz - Senior Game Designer @ EA, Visceral, Sledgehammer Games
http://www.rosiewrede.com/index.php?nav_bar=level_design

Leo Gonzalez - Senior Artist @ Certain Affinity
https://leog.artstation.com/

Brandon Pham - Lead Environment Artist
https://brandonpham.artstation.com/

We believe that education should be free for everyone! Come join us at Game School Online™ and see what the future of game development education looks like today! For more information about Game School Online™, available courses, scholars, and events, please visit http://gameschoolonline.com/

Discord: https://discordapp.com/invite/BzU5Fq2
Patreon: https://www.patreon.com/gameschoolonline