# Orient camera to surface

**URL:** <https://discourse.mcneel.com/t/orient-camera-to-surface/166714>\
**Category:** Rhino\
**Tags:** windows\
**Created:** [October 4, 2023, 5:43pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714 "2023-10-04T17:43:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ERIK\_RATLIFF](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erik_ratliff/32/503804_2.png) [@ERIK\_RATLIFF](https://discourse.mcneel.com/u/ERIK_RATLIFF)\
**Post date:** [October 4, 2023, 5:43pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/1 "2023-10-04T17:43:10Z")

</div>

Anyone know why orientcameratosrf rotates the view in whatever manner it chooses? Sure, the view is perpendicular to the surface but the view is rotated 90° or whatever angle Rhino decides. Anyone know how to make it not just do whatever it wants?

---

<div class="post-metadata">

**Author:** ![encephalon](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/encephalon/32/611970_2.png) [@encephalon](https://discourse.mcneel.com/u/encephalon)\
**Post date:** [October 4, 2023, 5:56pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/2 "2023-10-04T17:56:03Z")

</div>

have you got a file? i have no idea why it would rotate by 90° never happened to me, i assume you might have your cplane or viewport rotated and are working from there… but thats just highly speculative.

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [October 4, 2023, 5:59pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/3 "2023-10-04T17:59:00Z")

</div>

Hi Erik - it might be more predcitable/controllable with a macro using the CPlane:

`_CPlane _Surface _Pause _Pause _Pause _SetView _CPlane _Top _Cplane _Undo`

@ERIK_RATLIFF :

1. nestable `CPlane` command \> Surface option
2. three pauses to a) select the surface, b) set the origin, c) set the rotation.
3. nestable `SetView` command \> Cplane option \> Top option, i.e. set the view to look at the current CPlane from its ‘top’ with X to the right.
4. CPlane command \> Undo option to reset to the previous CPlane, now that the view is where we want it.

Note setting the view to CPlane Top does not force the projection - perspective cameras will keep perspective projection. To force a parallel view the simplest is to replace the SetView part of the macro with the `Plan` command.

`_CPlane _Surface _Pause _Pause _Pause _Plan _Cplane _Undo`

-Pascal

---

<div class="post-metadata">

**Author:** ![ERIK\_RATLIFF](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erik_ratliff/32/503804_2.png) [@ERIK\_RATLIFF](https://discourse.mcneel.com/u/ERIK_RATLIFF)\
**Post date:** [October 4, 2023, 6:30pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/4 "2023-10-04T18:30:45Z")

</div>

[orientcamertosrf.3dm](https://discourse.mcneel.com/uploads/short-url/vRfmIpB06QGSprdYMFaQwU5QuU1.3dm) (2.0 MB)

I never mess with cplanes since i don’t really understand them well, just gets confusing for me.

Pascal’s method works though.

---

<div class="post-metadata">

**Author:** ![ERIK\_RATLIFF](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erik_ratliff/32/503804_2.png) [@ERIK\_RATLIFF](https://discourse.mcneel.com/u/ERIK_RATLIFF)\
**Post date:** [October 4, 2023, 6:33pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/5 "2023-10-04T18:33:00Z")

</div>

That works well Pascal. Can you point to a resource for learning about cplanes more?

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [October 4, 2023, 8:58pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/6 "2023-10-04T20:58:32Z")

</div>

There is this -

[https://docs.mcneel.com/rhino/7/help/en-us/index.htm#commands/cplane.htm#(null)](https://docs.mcneel.com/rhino/7/help/en-us/index.htm#commands/cplane.htm#(null))

-Pascal

---

<div class="post-metadata">

**Author:** ![ERIK\_RATLIFF](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/erik_ratliff/32/503804_2.png) [@ERIK\_RATLIFF](https://discourse.mcneel.com/u/ERIK_RATLIFF)\
**Post date:** [October 4, 2023, 9:06pm UTC](https://discourse.mcneel.com/t/orient-camera-to-surface/166714/7 "2023-10-04T21:06:26Z")

</div>

Okay, the command lists can always help. I think I just need to use cplanes more and get comfortable with it. Thanks Pascal.
